Last active
May 29, 2018 12:35
-
-
Save stefan-huettemann/ec0418df3f09b1159d2183a50054e8bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A random collection of power-shell commands - just to tease my memory | |
# remove old attachments to save disk space ... | |
Get-ChildItem –Path “E:\test” –Recurse | Where-Object CreationTime –lt (Get-Date).AddDays(-30) | Remove-Item –WhatIf | |
Get-ChildItem -Path "E:\test" -Recurse | Where-Object LastWriteTime -lt "2018-02-01" | Remove-Item –WhatIf | |
Get-ChildItem -Path "E:\test" -Recurse | Where-Object LastWriteTime -lt "2018-02-01" | Remove-Item | |
# list files | |
Get-ChildItem -Path "E:\test" -Recurse | Where-Object LastWriteTime -lt "2018-02-01" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment