Tips & Tricks

How to Install Hyper-V on Windows 11 Home with a .bat Script

How to Install Hyper-V on Windows 11 Home with a .bat Script

This guide focuses on how to install Hyper-V on Windows 11 Home using a hyperv.bat script file (save the script in Notepad and run it with administrator privileges). If you want a full walkthrough - from enabling virtualization in the BIOS to running DISM commands in Command Prompt - check out our guide on Enable BIOS Virtualization and Install Hyper-V on Windows 11 Home.

Every major Windows release includes various editions or SKUs, each with different features. Windows 11 is no exception, offering versions such as Home, Pro, and more. One major feature typically reserved for Pro editions is Hyper-V, but with a little tinkering, you can actually get it running on Home editions. In this article, we will show you how to install Hyper-V on Windows 11 Home.

How to Enable Hardware Virtualization in Windows 11

How to Install Hyper V on Windows 11 Home Features 01
Enabling hardware virtualization in the BIOS on an HP laptop

Hyper-V is a bare-metal hypervisor that requires hardware virtualization to be enabled in the BIOS to function. Most modern systems support hardware virtualization, and you can enable it through the BIOS settings.

The following steps are intended for HP laptops. Please refer to the user manual or documentation on your computer manufacturer's website for instructions regarding other systems.

To enable hardware virtualization in the BIOS:

  1. Turn off your PC if it is currently powered on.
  2. Press the power button to turn on the computer, then immediately start tapping the F10 key to enter the BIOS. The BIOS setup key varies by manufacturer, so try F10, F2, F12, F1, or DEL to see which works for your device.
  3. Once inside the BIOS Setup utility, navigate to the Configuration tab.
  4. Use the arrow keys to highlight Virtualization Technology.
  5. Press Enter and select Enabled. Press Enter again to confirm the selection.
  6. Next, press F10 to save your changes and exit the BIOS.
  7. Your PC will restart with hardware virtualization enabled. You can now proceed with installing Hyper-V on your system.

How to Install Hyper-V on Windows 11 Home

The next step is to create and run a batch script to install the necessary files to enable Hyper-V on Windows 11 Home.

Before proceeding, create a system restore point. This allows you to revert your computer to its current state if any issues occur during the process.

To enable Hyper-V in Windows 11 Home:

1. Open a new Notepad file. To do this, press Win + R, type notepad, and click OK.

How to Install Hyper V on Windows 11 Home Features 02
Opening a Notepad file

2. In the Notepad file, copy and paste the following script:

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

3. Press Ctrl + S to open the Save dialog.

4. In the file name field, type hyperv.bat. The .bat extension at the end of the filename is essential for executing the script.

How to Install Hyper V on Windows 11 Home Features 03
Saving the Hyper-V installation script

5. Next, click the Save as type drop-down menu and select All Files.

6. Click the Save button to save the file.

How to Install Hyper V on Windows 11 Home Features 04
Running the script as administrator

7. Right-click the hyperv.bat file and select Run as administrator. Click Yes if prompted by User Account Control.

8. The script will begin executing in the Command Prompt to install Hyper-V. This may take a few minutes, so please wait for the process to finish.

9. Once complete, you will see the message Operation completed successfully.

How to Install Hyper V on Windows 11 Home Features 05
Success message

10. Type Y to confirm and restart your PC. Alternatively, type N to exit the Command Prompt.

Note that you must restart your PC to apply the changes. Once restarted, Hyper-V should be available on Windows 11 Home. You can search for Hyper-V in the Windows search bar and click Hyper-V Manager to create a new virtual machine.

If it is still unavailable, you can enable Hyper-V via the Windows Features dialog, Command Prompt, or Windows PowerShell.

Here is how you can quickly add Hyper-V to Windows 11 using Command Prompt:

1. Press the Win key and type cmd. Right-click Command Prompt and select Run as administrator.

How to Install Hyper V on Windows 11 Home Features 06
Enabling Hyper-V via CMD

2. In the Command Prompt window, type the following command and press Enter:

DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

3. This command uses the Deployment Imaging Service and Management (DISM) tool to enable Microsoft Hyper-V and its required dependencies on your Windows machine. When the Operation completed successfully message appears, Hyper-V has been successfully enabled.

Good luck!

Share: Facebook 𝕏 Email P in
Question and answer (0 comments)

Table of contents
  1. Top