Getting “Stopped” Hyper-V VM state from PowerShell

hyper-vvirtualization

I'm using http://pshyperv.codeplex.com/ for managing Hyper-V through PowerShell.
OS: Windows Server 2012

This PS module can get VMs which are running and, I guess, should get the ones which are in a stopped state. Commands:

Get-VM -Running

Get-VM -Stopped

If getting running machines is no problem and correct list is returned, I have an issue, or maybe lack of knowledge, how to get stopped machines, because when I shut down the machine it is still not returned by Get-VM -Stopped. State of machine is "Off". As soon as I start it, it's on the Running list like nothing happened. VM is NOT deleted completely, just shut down.

Any ideas?

Best Answer

I'd try the native w2k12 hyper-v powershell commands they are much more complete then the codeplex ones. The ones on codeplex I think are geared to w2k8r2.

Related Topic