VMware Power-CLI: shutdown/power-off all VMs with a dedicated VMware Tag

This one-liner will help you to shutdown or power-off VMs with a given VMware Tag:

$2shutdown = Get-VM -Tag “your_Tag”;
foreach ($vm in $2shutdown){Shutdown-VMGuest -VM $vm.name -Confirm:$false}

To perform a hard power-off just use this command:

$2shutdown = Get-VM -Tag “Hugo”;
foreach ($vm in $2shutdown){Stop-VM -VM $vm.name -Confirm:$false}

Leave a Comment

Your email address will not be published. Required fields are marked *