Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

Poweroff and Poweron 1000 VMs in Parallel

$
0
0

Hi

 

I've a maintenance is coming up for which I need to shutdown 1000+ VMs and once the Maintenance is complete, Need to start those VMs back on.

 

I've a list of 1000 VMs and I can run in for loop but that will take hours to shutdown these VMs and I only have 2 hours of Maintenance window, Can someone please help ?

 

Here is the script which I got from the community and it works as expected but it runs serially.

 

foreach ($vmlist in (Get-Content -Path C:\vmlist1.txt)){

$vm = Get-VM -Name $vmlist

Start-VM -VM $vm -Confirm:$false -RunAsync

}

 

Thanks & Regards


Viewing all articles
Browse latest Browse all 175326

Trending Articles



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