Instantly share code, notes, and snippets.
Save HimDek/6edde284203a620745fad3f762be603b to your computer and use it in GitHub Desktop.
Hyper-V in Windows 10 and Windows 11 allows running Virtual Machine. It is supported only in Pro, Enterprise and Education Edition of Windows 10 and Windows 11 by default. But this guide will show you how to enable it in Home Editions of Windows 10 and Windows 11.
- Search for
Command Prompt
in Windows Start Menu and open it. - Type
systeminfo
and press Enter. Wait for the process to finish - Once the results appear, search for the
Hyper-V Requirements
section which is usually the last one.- If it says
A hypervisor has been detected. Features required for Hyper-V will not be displayed.
that means Hyper-V is already enabled and there is no reason following this guide anymore. - Otherwise, check for
Virtualization Enabled in Firmware:
.- If its
Yes
,click here. - If its
No
,click here.
- If its
- If it says
The process of enabling virtualization can vary a lot depending on the motherboard manufacturer, but it can be summarized in a few steps:
- Completely Shutdown you Computer.
- Turn on the computer and while it is booting up, keep pressing the key to open the BIOS (usually it is
Del
,F1
,F2
,F4
,F11
, orF12
). This key depends on the Motherboard manufacturer. You can easily google it out. - Once you get into the BIOS, it may look very scary or intimidating, but don't worry, you will get it right. Mouse may not work in BIOS so you might have to use the Directional or Arrow keys and the Enter key of the Keyboard to navigate.
- Search for the CPU configuration section, it can be called
CPU configuration
,processor
,Northbridge
orChipset
and may be under anadvanced
oradvanced mode
tab or menu. - Now you need to look for the virtualization option and enable it, it can have different names such as
Hyper-V
,Vanderpool
,SVM
,AMD-V
,Intel Virtualization Technology
orVT-X
.
- Search for the CPU configuration section, it can be called
- Once its enabled, save and reboot your pc.If this part did not help you, you can specifically go the Website of the Mother Board Manufacturer of your Computer and ask for help there.
- Open File Explorer on windows and Navigate to a folder.
- Right click anywhere in a blank space inside the folder. Select
New
and then ClickText Document
. - Open the file in Notepad and copy and paste the following text into it.
pushd "%~dp0"dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txtfor /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"del hyper-v.txtDism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALLpause
- Click
File
from the Menu bar in the top of Notepad, then clickSave as...
. In the Save as Window that appears, Change the File name to"Hyper-V.bat"
and click save. - Now Double click
Hyper-V.bat
to run it. This will take some time but will install all features required for Hyper-V. A Restart might be required after it is done. - After Restarting Windows, search for
Turn Windows features on or off
in the Start Menu search bar and open it. - In the Window, lookout for
Hyper-V
,Virtual Machine Platform
andWindows Hypervisor Platform
. Then check the check boxes before them and clickOK
. This will also take some time and then a Restart is necessary.
Thats it Hyper-V is enabled.
verdysh commentedMay 8, 2022
Thanks man!
0xheycat commentedMay 26, 2022
thank you
talhabw commentedJun 17, 2022
Hi,
Do you know a way to disable it? It saysA hypervisor has been detected. Features required for Hyper-V will not be displayed.
to me. I need to disable it for Intel HAXM.
Thanks in advance.
Ducdinhvan commentedJan 22, 2024
Note: Need "Run as administrator" for Hyper-V.bat
bluepanda280 commentedMar 22, 2024
It WORKS! :) now i have a virtual machine to distory windows withside smerk
thr03 commentedMay 29, 2024
why in my machine cannot view hyper-v thank you answer
ThePhoenixd commentedJun 20, 2024
C:\>pushd "C:\"C:\>dir /b C:\Windows\servicing\Packages\*Hyper-V*.mum 1>hyper-v.txtFile is not foundC:\>for /F %i in ('findstr /i . hyper-v.txt 2>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%i"C:\>del hyper-v.txtC:\>Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALLCистема DISMВерсия: 10.0.22621.2792Версия образа: 10.0.22631.3155Ошибка: 0x800f080c
p2p-notes commentedAug 6, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✨👍after running the script it asked to restart when i restarted i went into a boot loop where my laptop can't bootup
the last time this happened months ago i had to reset the pc now i am trying to disable hyper v
p2p-notes commentedAug 6, 2024
i tried disabliing through dism but it said disable feature is not a command then i tried through registery edit command it said its done but after restarting nothing happened now i am resting the laptop with my files keeped
p2p-notes commentedAug 6, 2024
done im glad there is an option to keep my files when doing a reset👍
ballgitte commentedAug 18, 2024
thanks! worked for me. i did need to turn on Virtual Machine Platform inTurn Windows features on or off
to fully turn hyper-v on. just make sure to restart your pc before doing so (after installing hyper-v from the .bat) in case of above issues
cristcost commentedOct 11, 2024
Hey all, I'm having BSOD after updating to windows home 24h2 and I suspect the cause is having enabled hyper-v.
matoka02 commentedOct 31, 2024
It works! Thank you for this magic!
DuraisaravananN commentedJan 6, 2025
But i am getting this error why anyone help me
Deployment Image Servicing and Management tool
Version: 10.0.22621.2792
Image Version: 10.0.22631.4602
Error: 0x800f080c
Feature name Microsoft-Hyper-V is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.
The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
safwanskr04 commentedJan 22, 2025
You are a life saver bro
Edithamchil commentedJan 28, 2025
Cara download nya gmna
jrslyce commentedJan 31, 2025
Thank you hero!
NullExceptionDialog commentedFeb 12, 2025
how do i undo it?
StefanHorz commentedFeb 28, 2025
After the the Update to Win11 Home24H2 I had to to enable Hyper-V again with this batch. Most things worked again, but I was not able to start a VM withTPM enabled: 'VMName' failed to start worker process: This operation returned because the timeout period expired. (0x800705B4). (Virtual machine ID 6174D568-D9E5-42E5-A907-C768BF35762C).
I removed "-V" in the second line to get also the HyperV packages, not only Hyper-V packages:
dir /b %SystemRoot%\servicing\Packages\*Hyper*.mum >hyper-v.txt
After a reboot, I was able to start a VM withTPM enabled in Win11 Home24H2.
NullExceptionDialog commentedMar 6, 2025
oke thx
KaiHangYang commentedMar 12, 2025
Thanks!
errPolybius commentedApr 11, 2025
Note: Need "Run as administrator" for Hyper-V.bat
Note: (I) Need "Reading Comprehension" to be allowed on github :(
ConsciousMachines commentedApr 13, 2025
Thank you!
itsagunofficial commentedApr 26, 2025
I don’t know why after I used this my OS stopped working and put me in a BIOS loop
2020270127 commentedMay 13, 2025
when we can't enable VirtualMachinePlatform feature, we can use same bat script by transcripting "hyper~" to "virtual for error 1168. it worked for me
reiprado commentedJun 2, 2025
Below Hyper-V Manager there's nothing detected, when trying to connect to Local Machine it gives an error.
Hyper-V Manager
An error occurred while attempting to connect to server "MACHINENAME-". Check that the Virtual Machine Management service is running and that you are authorized to connect to the server.
Hyper-V encountered an error trying to access an object on computer 'MACHINENAME-' because the object was not found. The object might have been deleted. Verify that the Virtual Machine Management service on the computer is running.
Close
alesh4 commentedJun 7, 2025
Had a similar thing@reiprado
Not supported for Home edition, so you know, can't complain. However, I was able to make it work by re-installing update 24H2 from the System -> recovery -> reinstall current version. Something like that. Worked me, but YMWV.
reiprado commentedJun 7, 2025
It's not needed anymore here, but thanks for sharing Alesh.
localhost-collab commentedJun 9, 2025
ScubadooX commentedJun 19, 2025
The script failed after detecting that a file was missing, a few minutes into the script. Although Hyper-V showed up as a selectable option and I could launch it, the function to create a new VM was missing. So, I disabled it. I'll stick with VirtualBox.