How to Delete Hyper-V Virtual Machine in Windows 10


Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical computer systems, however they exist in a virtualized and isolated environment.

If you like, you can delete a Hyper-V virtual machine to remove it from the Hyper-V Manager.

When you delete a Hyper-V virtual machine, it deletes the virtual machine's configuration file, but does not delete any virtual hard drives (.vhdx). If the virtual machine has any checkpoints (aka: snapshots), these are deleted and merged into the virtual hard disk files after the virtual machine is deleted.

This tutorial will show you how to delete a Hyper-V virtual machine on your Windows 10 PC.


 CONTENTS:

  • Option One: Delete Hyper-V Virtual Machine in Hyper-V Manager
  • Option Two: Delete Hyper-V Virtual Machine in PowerShell





OPTION ONE

Delete Hyper-V Virtual Machine in Hyper-V Manager


1. Open Hyper-V Manager (virtmgmt.msc).

2. Select the Hyper-V virtual machine (ex: "Windows 7 Ultimate") you want to delete, and perform one of the following actions: (see screenshot below)
  • Press the Del key.
  • Click/tap on Delete in the Actions pane on the far right.
  • Right click or press and hold on the virtual machine, and click/tap on Delete.

Delete Hyper-V Virtual Machine in Windows 10-delete_hyper-v_virtual_machine-1.jpg

3. When prompted, click/tap on Delete to confirm. (see screenshot below)

Delete Hyper-V Virtual Machine in Windows 10-delete_hyper-v_virtual_machine-2.png

4. When finished, you can close the Hyper-V Manager if you like.






OPTION TWO

Delete Hyper-V Virtual Machine in PowerShell


To see more usage options for the Remove-VM command, see: Remove-VM

1. Open an elevated PowerShell.

2. Type Get-VM into the elevated command prompt, and press Enter. Make note of the Hyper-V virtual machine name (ex: "Windows 7 Ultimate") you want to delete. (see screenshot below)

Delete Hyper-V Virtual Machine in Windows 10-get-vm.png

3. Type the command below into the elevated PowerShell, and press Enter. (see screenshot below)

Remove-VM "<VM name>" -Force"

Substitute <VM name> in the command above with the actual virtual machine name (ex: "Windows 7 Ultimate") from step 2 you want to delete.

For example: Remove-VM "Windows 7 Ultimate" -Force"


Delete Hyper-V Virtual Machine in Windows 10-delete_hyper-v_virtual_machine_powershell.png

4. When finished, you can close the elevated PowerShell if you like.


That's it,
Shawn