Something I regularly need to do is search for files that are older than a certain amount of time and do something with them, like move or delete. Here’s a handy snippet how to do it in PoSh.
Get-ChildItem | ? LastWriteTime -le ((Get-date).AddMinutes(-30)) | del
The question mark is an alias for
-le means “less than or equal”, and
AddMinutes has close relatives like
AddDays… just use the autocomplete via the tab key after “Add” to get more.