VMware Cloud Community
gpgore
Enthusiast
Enthusiast

Powershell PowerCLI Script for deleting VMs after X days of being powered off

Any know a good powercli cmd to do the following

log into VCenter

go to a folder in VMWare we we move all our powered VMs to

Delete VDMK file after X days (30 days)

Thanks,Greg

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership

30 days after what ?

The creation, the power on, the move into the directory ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
gpgore
Enthusiast
Enthusiast

Sorry, 28 days after it was powered off and/or moved to the folder.

Reply
0 Kudos