In order to create a New VM for some R_&_D purpose, I neeed to delete some old VM’s.

But unfortunately it didn’t allow me to do so. It showed the following error: “The operation cannot be performed while the object is in its current state.

After some googling I found a solution which I would like to share with myself and all… 😉

The folder where you Virtual Machine exists contains a XML file with a GUID.

You just need to browse to the location:

C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines

{It contains a set of XML documents, one for each Virtual Machine.}
Find the XML file with the same GUID and delete it.

**Note: Since ProgramData is a Hidden folder so you need to first enable “Show hidden files, folder and drives under Folder Option

After deleting that shortcut XML file you will notice that the VM has been removed from the Hyper-V Manager. Now you can delete the specific folder containing the .VHD as well to free space.


Thanks !!!