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