Cleaning up
Who doesn’t love cleaning up old files, don’t worry, Powershell comes to the rescue.
We all know that shared network drives collect all kind of garbage, and usually around 90% could actually be missed.
I’ve recently been working on cleaning up files which were created a long time ago, thanks to Powershell, we can script this action and make Powershell work for us.
What I do here is to look at the creation date of the files and delete them if they are older than 2 years old, so we set a limit to target only those who are old enough to be removed.
I recommend having backup of the files before running these Powershell scripts.
Logging the output is also recommending