Thursday, September 26, 2013

This PowerShell Command will reconfigure a list of VMware guests by gracefully shutting them down. Then it will sleep and finally will reset memory to 2gb and number of cpu to 1 and then start the VM.


get-content "c:\scripts\VMLIST.txt" | foreach-object { shutdown-vmguest $_ -confirm:$false }
sleep 30
get-content "c:\scripts\VMLIST.txt" | foreach-object { set-vm $_ -memoryGB 2 -numCPU 1 -confirm:$false | start-vm } 

No comments:

Post a Comment