I'm kind of a newb at this, so please be gentle if my code isn't optimal. I worked at this script most of the day yesterday, expanding functionality and thinking of instances that could mess it up. By ...
Why doesn't this work? My output has blanks for the LastWriteTimes and the functional version of the code (with Remove-Item instead of Write-Host) doesn't delete any files.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results