Rashida11
Contributor
Contributor

Shutdown only powered on vm in a resource pool

Can anyone tell me how I can shutown only powered on vm in a resource pool??

Cheers

0 Kudos
1 Reply
LucD
Leadership
Leadership

You can do that this way:

Get-ResourcePool <pool-nam> | Get-VM | Where-Object {$_.powerstate -eq "PoweredOn"} | Shutdown-VMGuest


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos