Delete Mutiple VMs from vCenter using VMware Pwer Cli



Put all the servers to be deleted into  a txt file with your VM’s name one per line.


Open PowerCLI

Connect on VC:
Connect-VIServer –Server “vc@domain.com”


put servers.txt in C: drive and run the following command

Get-Content c:\servers.txt | foreach { Remove-vm $_ -DeleteFromDisk -Confirm:$false }

Comments

Popular posts from this blog

enable TLS 1.2 and disabling TLS1.0 and SSL 3 on all exchange servers and Clients

HP 3PAR storage Commands to troubleshoot performance issues