Windows 10 Hyper-V: VM State PowerShell Bug?

Ran into this today.  I have a PowerShell script that builds a series of VMs as part of a lab build-out.  After upgrading my machine to Windows 10 the script no longer works.  What is supposed to happen is that it starts building a VM and loops every couple of minutes looking for the VM’s state to see if it is “Running”.  At the end of the VM’s build MDT shuts the VM down.  The script sees that the VM is no longer running, powers it back on and moves on to the next VM.

What happens when I run this on Windows 10 Hyper-V is that the script never notices that the VM has shut down.

As you can see, the VM is powered off, but the Get-VM PoSh cmdlet shows that it as still running….Win10_HyperV_VMisnotrunning

Posted on January 27, 2015, in Hyper-V, PowerShell, Windows 10 and tagged , , . Bookmark the permalink. Leave a comment.

Leave a comment