VMware Cloud Community
VinayPatel
Contributor
Contributor

PowerCLI: One-Liner - how to pass more than two vmnames to remove from disk

PowerCLI

Tags (1)
0 Kudos
2 Replies
CRad14
Hot Shot
Hot Shot

Get-vm vmname1, vmname2 | Remove-vm -deletepermanently

As it says, this Will delete VMs...use with caution

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! 🙂
0 Kudos
LucD
Leadership
Leadership

And thanks to OBN you could do it even shorter Smiley Wink

Remove-VM -VM VM1,VM2 -DeletePermanently -Confirm:$false


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

0 Kudos