Here is a simple way to use PowerShell to delete old files. In my
example I want to delete files older than 365 days off of a remote
server.
dir \\SOME_HOSTNAME\SOME_FOLDER -recurse | WHERE {($_.CreationTime -le $(Get-Date).AddDays(-365))} | Remove-Item -Force
* Make sure you test before deploying in production
Friday, July 26, 2013
Use PowerShell to delete old files
Labels:
Microsoft,
PowerShell
Wednesday, July 3, 2013
License VMware Workstation from CLI
I installed Fedora 19 on my laptop and decided to install VMware
Workstation 9 on it as well. The install was straight forward, but I
could not enter the license key through the GUI. However, no need to
panic, doing this from the CLI is pretty straight forward.
Provided you performed the default install you should be able to use the following:
/usr/lib/vmware/bin/vmware-vmx --new-sn xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Labels:
virtualization
Subscribe to:
Posts (Atom)