Skip to content

Instantly share code, notes, and snippets.

@palaashatri
Created April 15, 2024 10:38
Show Gist options
  • Save palaashatri/e630bfca452cafbe97d3e8bd47304624 to your computer and use it in GitHub Desktop.
Save palaashatri/e630bfca452cafbe97d3e8bd47304624 to your computer and use it in GitHub Desktop.
Install Hyper-V on Windows 10/11 Home. Run as Administrator.
@REM Simple batch script to download and install Hyper-V manager on devices running Windows 10/11 Home,
@REM so that you can run both Docker and a full-fledged, hardware-accelerated, virtualized OS alongwith Windows on this Type-1 hypervisor
@REM How to run?
@REM Open a conhost as administrator (in PowerShell, use "Start-Process cmd.exe -Verb runAs"), and then
@REM execute this script, simply by calling "hyper-v-on-windows-home.bat"
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment