In the case in future, if you need to power on bulk VMs in a VC and check the status of those VMs whether they powered on or not, below script can be used
- Paste
the list of VMs which you wish to power on, in a notepad and save it with
some name.
- Get-VM
(get-Content D:\temp\s.txt) | start-VM
Here saved it on the s.txt file, then run above in powercli, it
will power on all the VMs in the saved notepad file. once done if you wish to check
the power status of the VM then please run like below
Get-VM (get-Content D:\temp\s.txt)
It will give output like below, or you can import this file
to a CSV/excel, for better filtering for powered off/powered on as like below
Get-VM (get-Content D:\temp\s.txt) | export –csv
D:\temp\s.csv
Your style is so unique compared to other people I have read stuff from. Many thanks forposting when you have the opportunity, Guess I will just bookmark this site Debut VMWare Workstation Pro
ReplyDeleteThank you
ReplyDelete