Change to the directory you want to scan first. This scans subfolders as well.
Copy to Clipboard
Get-ChildItem -Path 'c:\' -Recurse | where-object {$_.LastWriteTime -gt (Get-Date).AddDays(-5) -and $_.PSIsContainer -eq $false}
Another version which checks for files newer than a certain date Copy to Clipboard
Get-ChildItem 'C:\Users' -Recurse | Where-Object {$_.LastWriteTime -le '01/01/2025'} | select-Object FullName, LastWriteTime
|