Hyper-V and PowerShell: VM Process

by Eric Siron

In the article that contains the Restart-VM script, I mentioned that a VM that can’t be stopped with Stop-VM requires you to kill its VMWP process. It might not be obvious how to determine which process that is. I’ve written a script to help you do that.

This article is part of the “Hyper-V and PowerShell” series.

This script is extremely straightforward so it doesn’t require a lot of explanation. I opted to only allow you to input a single VM name at a time. If you use the pipeline, it will run once for each input object as normal.

As with the Restart-VM script, I designed this one as a function that must be dot-sourced. Please read that article for directions.

Read more here