We can get the list of VMs with powershell cmdlets "Get-VM". The returned set have two columns "State" and "Status". I need to know what are the possible state or status may be for a VM. I have an application that need to perform various action based on the state of VM (specially error state).
you can use powershell command:
Import-Module Hyper-V
[enum]::GetNames([Microsoft.HyperV.Powershell.VMState])
[enum]::GetNames([Microsoft.HyperV.Powershell.VMOperationalStatus])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With