Skip to content

Instantly share code, notes, and snippets.

@douglascodes
Created February 23, 2017 02:40
Show Gist options
  • Save douglascodes/71a796e50c42ee864d0d8d19743e61b0 to your computer and use it in GitHub Desktop.
Save douglascodes/71a796e50c42ee864d0d8d19743e61b0 to your computer and use it in GitHub Desktop.
Gets files where -14 days old. Can be turned into a function easily.
Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-14) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment