Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Delete content of all users Download folders

$
0
0

Hi ,

I checked in the forum for that but did not find anything that can suits my issue.

I need to delete all the content of all users download folder every night .

I tried this %userprofile%\Downloads | where {($_.LastWriteTime).AddDays(1) -lt (get-date)} | remove-item -force -recurse

but  it does not help.

Could you please help me or put me in the right direction .

Thanks

AGYL


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>