April 24, 2025

How to Uninstall Hyper-V in Windows Server Using the Command Line

mr rockstar

How to Uninstall Hyper-V in Windows Server Using the Command Line
Cheap Dedicated Server

How to Uninstall Hyper-V in Windows Server Using the Command Line

Hyper-V is a powerful virtualization platform built into Windows Server, but there are scenarios where you may want to remove it—perhaps to free up system resources, switch to another hypervisor, or simplify your server role. In this post, we’ll guide you through the process of uninstalling Hyper-V using the command line in Windows Server.


Step-by-Step Guide to Uninstall Hyper-V

There are two primary ways to uninstall Hyper-V via the command line: using PowerShell or using the DISM tool.

1. Using PowerShell

PowerShell is the most efficient way to remove Hyper-V:
Using PowerShell

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
  • This command disables the Hyper-V role.
  • You’ll be prompted to restart the server. Type Y and press Enter.

Alternatively, to completely remove it:
Alternatively, to completely remove it

Uninstall-WindowsFeature -Name Hyper-V -IncludeManagementTools

This will remove both the Hyper-V platform and its management tools.

2. Using DISM (Deployment Image Servicing and Management)

You can also use DISM to uninstall Hyper-V:
Using DISM (Deployment Image Servicing and Management)

dism /Online /Disable-Feature /FeatureName:Microsoft-Hyper-V-All
  • This command disables Hyper-V and requires a system restart.

Post-Uninstallation Tips

  • Make sure to reboot your server to finalize the removal.
  • If you encounter errors, verify if nested virtualization is enabled or if other dependent roles are installed.

 

How to Uninstall Hyper-V in Windows Server Using the Command Line (F.A.Q)

Is a reboot required after uninstalling Hyper-V?

Yes, a reboot is mandatory to complete the removal process.

Can I reinstall Hyper-V later?

Absolutely. Use Install-WindowsFeature -Name Hyper-V or enable it through Server Manager.

Will removing Hyper-V delete my VMs?

No, the virtual machines (VMs) remain on disk unless you manually delete them.

 

Can I uninstall Hyper-V without PowerShell?

Yes, you can use DISM via Command Prompt as shown above.

Popular Blog Posts