Virtualization Delete Hyper-V Virtual Machine in Windows 11


  • Staff
Hyper-V_virtual_machine_banner.png

This tutorial will show you how to delete one or more Hyper-V virtual machines at once in Windows 10 and Windows 11.

Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems can be used and managed just as if they were physical computer systems, however they exist in virtualized and isolated environment. Special software called a hypervisor manages access between the virtual systems and the physical hardware resources. Virtualization enables quick deployment of computer systems, a way to quickly restore systems to a previously known good state, and the ability to migrate systems between physical hosts.

If you no longer need a Hyper-V virtual machine, you can easily delete it to remove it from the Hyper-V Manager and free up hard drive space.

When you delete a virtual machine, only the virtual machine's configuration file gets deleted. It does not delete any virtual hard drives. If the virtual machine has any checkpoints, they are deleted and merged into the virtual hard disk files after the virtual machine is deleted. You will need to manually delete these in File Explorer if wanted.

Reference:

You must be signed in as an administrator to delete a Hyper-V virtual machine.



Contents

  • Option One: Delete Hyper-V Virtual Machine(s) in Hyper-V Manager
  • Option Two: Delete Specific Hyper-V Virtual Machine in PowerShell
  • Option Three: Delete All Hyper-V Virtual Machines in PowerShell




Option One

Delete Hyper-V Virtual Machine(s) in Hyper-V Manager


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

2 Select one or more virtual machines (ex: "Windows 11 Home") in the middle pane you want to delete. (see screenshot below)

3 Perform one of the following actions below to delete the virtual machine(s):
  • Press the Del key.
  • Click/tap on Delete in the right "Actions" pane.
  • Click/tap on Action on the menu bar, and click/tap on Delete.
  • Right click on the selected virtual machine(s) in the middle pane, and click/tap on Delete.
Delete_virtual_machine_Hyper-V_Manager-1.png

4 Click/tap on Delete to confirm. (see screenshot below)

Delete_virtual_machine_Hyper-V_Manager-2.png

5 You can now close Hyper-V Manager if you like.




Option Two

Delete Specific Hyper-V Virtual Machine in PowerShell


1 Open Windows Terminal (Admin), and select Windows PowerShell.

2 Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshot below step 3)

Get-VM

3 Make note of the virtual machine name (ex: "Windows 11 Home") you want to delete. (see screenshot below)

List_virtual_machines_PowerShell.png

4 Type the command below into Windows Terminal (Admin), 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 11 Home") from step 3 you want to delete.

For example: Remove-VM "Windows 11 Home" -Force


5 You can now close Windows Terminal (Admin) if you like.

Delete_virtual_machine_PowerShell.png





Option Three

Delete All Hyper-V Virtual Machines in PowerShell


1 Open Windows Terminal (Admin), and select Windows PowerShell.

2 Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshot below)

Get-VM | Remove-VM -Force

3 You can now close Windows Terminal (Admin) if you like.

Delete_all_virtual_machines_PowerShell.png



That's it,
Shawn Brink


 
Last edited:
If you have activated a Windows 10 or Windows 11 VM you should be aware that by deleting it you will loose its digital license.

If you wish to keep the digital license for re-use later then you should first export the Hyper-V Virtual Machine. This will preserve the unique machine ID that is linked to the digital license. You can detach all virtual disks from the VM before exporting to keep the export size to a minimum.

To re-use the digital license you should import the Virtual Machine using "Restore" with Existing Unique ID.
 

My Computers

System One System Two

  • OS
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Acer Aspire 3 A315-23
    CPU
    AMD Athlon Silver 3050U
    Memory
    8GB
    Graphics Card(s)
    Radeon Graphics
    Monitor(s) Displays
    laptop screen
    Screen Resolution
    1366x768 native resolution, up to 2560x1440 with Radeon Virtual Super Resolution
    Hard Drives
    1TB Samsung EVO 870 SSD
    Internet Speed
    50 Mbps
    Browser
    Edge, Firefox
    Antivirus
    Defender
    Other Info
    fully 'Windows 11 ready' laptop. Windows 10 C: partition migrated from my old unsupported 'main machine' then upgraded to 11. A test migration ran Insider builds for 2 months. When 11 was released on 5th October it was re-imaged back to 10 and was offered the upgrade in Windows Update on 20th October. Windows Update offered the 22H2 Feature Update on 20th September 2022. It got the 23H2 Feature Update on 4th November 2023 through Windows Update.

    My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB NVMe ssd, supported device running Windows 11 Pro (and all my Hyper-V VMs).

    My SYSTEM FOUR is a 2-in-1 convertible Lenovo Yoga 11e 20DA, Celeron N2930, 8GB RAM, 256GB ssd. Unsupported device: currently running Win10 Pro, plus Win11 Pro RTM and Insider Beta as native boot vhdx.

    My SYSTEM FIVE is a Dell Latitude 3190 2-in-1, Pentium Silver N5030, 4GB RAM, 512GB NVMe ssd, supported device running Windows 11 Pro, plus the Insider Beta, Dev, Canary, and Release Preview builds as a native boot .vhdx.
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell Lattitude E4310
    CPU
    Intel® Core™ i5-520M
    Motherboard
    0T6M8G
    Memory
    8GB
    Graphics card(s)
    (integrated graphics) Intel HD Graphics
    Screen Resolution
    1366x768
    Hard Drives
    500GB Crucial MX500 SSD
    Browser
    Firefox, Edge
    Antivirus
    Defender
    Other Info
    unsupported machine: Legacy bios, MBR, TPM 1.2, upgraded from W10 to W11 using W10/W11 hybrid install media workaround. In-place upgrade to 22H2 using ISO and a workaround. Feature Update to 23H2 by manually installing the Enablement Package. Also running Insider Beta, Dev, and Canary builds as a native boot .vhdx.

    My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB NVMe ssd, supported device running Windows 11 Pro (and all my Hyper-V VMs).

    My SYSTEM FOUR is a 2-in-1 convertible Lenovo Yoga 11e 20DA, Celeron N2930, 8GB RAM, 256GB ssd. Unsupported device: currently running Win10 Pro, plus Win11 Pro RTM and Insider Beta as native boot vhdx.

    My SYSTEM FIVE is a Dell Latitude 3190 2-in-1, Pentium Silver N5030, 4GB RAM, 512GB NVMe ssd, supported device running Windows 11 Pro, plus the Insider Beta, Dev, Canary, and Release Preview builds as a native boot .vhdx.

Latest Support Threads

Back
Top Bottom