Find Files Modified Recently with PowerShell
Filter Get-ChildItem results by LastWriteTime to list every file changed in the last N days, sorted newest first.
01Command
$ Get-ChildItem 'C:\Users\me\Documents' -Recurse -File |
Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) } |
Sort-Object LastWriteTime -Descending |
Select-Object LastWriteTime, FullName02What it does
PowerShell doesn't need a special 'search by date' tool: Get-ChildItem returns proper DateTime properties you compare against (Get-Date).AddDays(-7) for 'changed this week' — switch to AddHours or a literal date like Get-Date '2026-03-01' as needed. Sorting descending puts the newest changes first, which is the fastest way to see what an installer or sync app touched today. Use -Recurse from a drive root to search everywhere, at the cost of scan time.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-ChildItemEvidence: Get-ChildItem FileInfo objects expose LastWriteTime, which can be filtered with Where-Object date comparisons.
- Get-ChildItem - SS64Evidence: Shows filtering files by date properties with Where-Object and sorting with Sort-Object.
Last verified: 2026-09-18 · Category: Files & Folders
06Related solutions
Search inside text files and logs with regex, returning file, line number and match.
Diagnose NTFS file system errors and bad sectors on any volume — including the system drive while Windows is running — before committing to a repair.
Robocopy is Windows' built-in robust file copier: use /MIR to keep a destination folder as an exact one-way mirror of a source, resumable and restartable.