Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Delete files through WMI based on date?

$
0
0

Hello,

I have to delete files remotely on Windows 2003 server without WinRM in place and hence only have access to WMI to manage. I'm running latest OS and PowerShell on front-end though.

My question is what is most efficient way to enumerate files in folder and delete files older then certain amount of days? It would be pretty trivial with PowerShell remoting but not as much where only WMI is at disposal.

Thanks,

G


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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