How to Reboot multiple VMs through Power CLI command
Please check https://www.running-system.com/powercli-script-to-power-off-and-power-on-dedicated-vms-listed-in-fil...
Moderator: Moved to PowerCLI Discussions, a search in this area will likely return an answer.
Do all these VMs have the VMware Tools installed in the Guest OS?
If yes, you can use something like this (you can use the use the Get-VM cmdlet to select a subset of VMs if needed)
Get-VM | Restart-VMGuest -Confirm:$false
If the VMs, or some of them, do not have the VMware Tools installed, you will have to use a remote method linked to the Guest OS.
But this requires certain settings in the Guest OS.
For example, to use a remote PowerShell command, you need to have PS remoting to be configured and allowed.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can reboot multiple VMs via:
Restart-VM VM1,VM2,VM3,VM4 -- replace VM1,V2 etc with your VM name
Click y for single VM reboot and A for all
Please give a thumbs up if this was helpful