Skip to content

Instantly share code, notes, and snippets.

@Clickbaitcake
Last active October 23, 2019 13:06
Show Gist options
  • Save Clickbaitcake/908ba372d4f68d3ec59efed0f9ce6c6b to your computer and use it in GitHub Desktop.
Save Clickbaitcake/908ba372d4f68d3ec59efed0f9ce6c6b to your computer and use it in GitHub Desktop.
Removes data in folder that was created more than 60 days ago.
CD "C:\PATHHERE"
Get-ChildItem | Where-Object {($_.CreationTime -lt (Get-Date).AddDays(-60))} | Remove-Item -Force -Recurse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment