#Enable The Hyper-V Role in Windows 10 Professional, Enterprise Or Education Using PowerShell
#If this is the first time, and if if this will be the only time enabling the Hyper-V role in Windows 10, then this PowerShell command is all you need. If you need to switch the Hyper-V services on/off to avoid interference with other hypervisors and without removing the Hyper-V role then download Hyper-V Switch.
#Enable Hyper-V Role Using PowerShell
1 |
Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All |
#Disable Hyper-V Role Using PowerShell
1 |
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V |
#The Long Story…
#Continue reading if you are having issues or are using a conflicting hypervisor or emulator and getting the dreaded Blue Screen of Death.
#Having Issues Enabling Hyper-V Role In Windows 10 Professional, Enterprise Or Education?
Check Requirements
- Windows 10 Enterprise, Professional, or Education
- 64-bit Processor with Second Level Address Translation (SLAT)
- CPU support for VM Monitor Mode Extension (VT-c on Intel CPU’s)
- Minimum of 4 GB memory
NOTE: The Hyper-V role cannot be installed on Windows 10 Home.
Many users have experienced issues with Android-based virtual machines and emulators, especially BlueStacks and Andy Android Emulator, which crash on startup when the Hyper-V role is active. This problem seems to have arisen after the Anniversary Update, which broke compatibility between Hyper-V and these emulators. Fortunately, recent updates to BlueStacks have addressed this issue. As of June 2023, BlueStacks now supports running with Hyper-V enabled when using Android 9 Pie instances. This means you can enjoy both Hyper-V functionalities and BlueStacks without having to constantly toggle Hyper-V on and off.
In my previous attempts to find a workaround, I installed the x86Android Android Emulator in Hyper-V. Although I managed to get an older version running, I found its touchscreen support and controls inadequate for my needs. Given BlueStacks’ user-friendly interface and overall better experience, I prefer to switch between Hyper-V and BlueStacks setups as necessary. Previously, I would remove and reinstall the Hyper-V role whenever needed, but this approach has a significant drawback: it results in the loss of Hyper-V Virtual Switch Manager settings. Each time I reinstall Hyper-V, I have to recreate these settings and reattach them to each virtual machine, leading to numerous orphaned network adapters. For those who want a seamless experience without the hassle of managing Hyper-V settings repeatedly, keeping up with the latest version of BlueStacks that supports Hyper-V might be the best solution.
!!!Hyper-V Switch To The Rescue!!!
Calm down. This utility doesn’t allow Hyper-V to run simultaneously with VMWare, VirtualBox or BlueStacks, but this great tool I found at least saves a reboot (it takes two reboots if you add and remove the Hyper-V role). Also, I don’t have to reconfigure Virtual Switch Manager every time I do it. This program automates a bcdedit
process to disable Hyper-V without removing the Hyper-V role as part of the process.
Use Hyper-V Switch
to toggle Hyper-V support on and off when using other emulators like VirtualBox or Andy Android Emulator to keep it fast and simple. I saved it to my Desktop and edited the executable file to Run as Administrator
just to be sure it has the rights needed. You can also single right-click on the executable file or shortcut and then single left-click on Run as Administrator
every time.
https://github.com/ygoe/HyperVSwitch – Download from GitHub
http://unclassified.software/apps/hypervswitch – Hyper-V Switch Website
#Enable The Hyper-V Role Using PowerShell manually or for the first time
#For the first and if the only time enabling the Hyper-V role then the command below is all you need.
1 |
Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All |
#Enable Hyper-V and all features.
#Type y and press Enter
#Disable The Hyper-V Role Using PowerShell
1 |
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V |
#Disable Hyper-V and all features
#Type y and press Enter
Manually Enable Hyper-V From The GUI
Windows Key-R
to bring up the Run
box.
Type optionalfeatures.exe
and single left-click OK
to execute (just means to run) optionalfeatures.exe
. This method actually allows for more control of the Hyper-V installation since you can deselect unneeded features. For example, some people may not have any need for the Hyper-V Module for Windows PowerShell
module if they don’t use PowerShell or PowerShell Direct to administer any virtual machines.
Single left-click to select the Hyper-V option. Single left-click the Plus sign to expand if you need to select or deselect any of the default features. I use all the Hyper-V features so PowerShell for this installation works just fine for me. The end goal is to avoid moving my mouse as much as possible.