Skip to content

Instantly share code, notes, and snippets.

@evilpilaf
Created April 20, 2020 14:34
Show Gist options
  • Save evilpilaf/09969d9acd8749c635fff1a6e6dbc342 to your computer and use it in GitHub Desktop.
Save evilpilaf/09969d9acd8749c635fff1a6e6dbc342 to your computer and use it in GitHub Desktop.
Get-ChildItem "{Path}" -Recurse -File | Where CreationTime -lt (Get-Date).AddDays(-{days}) | Remove-Item -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment