Monthly Archives: May 2010

Suspend Hyper-V VMs with PowerShell

I have one Hyper-V R2 server that fights with me on occasion. The VMs are responsive and I can RDP into them. The server itself is sometimes responsive, and I can RDP into it, but it fails to connect to Hyper-V manager. A reboot usually clears up the problem, but I hate to reboot the host machine with VMs still running.

I have noticed, however, that I can still access Hyper-V through the PowerShell API. As the VMs on this machine aren’t critical, I can suspend the VMs using the API. Then I can reboot the host machine, and start the VMs back up again using Hyper-V manager.

Continue reading Suspend Hyper-V VMs with PowerShell