Hi. Thank you for your question and reaching out. My name is John and I’d be more than happy to help you with your query.
Using PowerShell, it is much simpler to locate and end the virtual machine process that isn't responding. Run the Hyper-V "Hyper-V administrators" group-account as an administrator in the PowerShell console.
A VM process must be terminated using its GUID. The VM GUID can be found by name. Run the following command, for instance, to obtain the GUID for the VM with the name SVM-GUARDEDHOST1.
$VMGUID = (Get-VM "SVM-GUARDEDHOST1").ID
You can list every VM registered on this Hyper-V host along with their ID if you don't want to input the complete name of the VM:
Get-VM | Select VMName, VMId, path
Copy your VMID from the list that appears.
The process identifier (PID) for this VMGUID in vmwp.exe is:
$VMWMProc = (Get-WmiObject Win32_Process | ? {$.Name -match 'VMWP' -and $.CommandLine -match $VMGUID})
After that, you must use the Stop-Process command to forcibly end the Hyper-V virtual machine's process:
Stop-Process ($VMWMProc.ProcessId) –Force
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.