Created
September 14, 2017 11:26
-
-
Save a73xsh/f0b59ce3b897b181c1ca927ae17a9c0f to your computer and use it in GitHub Desktop.
VmWare VM PowerState
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vms = Get-Cluster <cluster_name> | Get-VM | |
write-host "Powered on: " ($vms | where {$_.PowerState -eq "PoweredOn"}).Count | |
write-host "Powered off: " ($vms | where {$_.PowerState -eq "PoweredOff"}).Count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment