How to Enable Hyper-V on Windows 11 via PowerShell

Why Use Hyper-V?

Hyper-V is Microsoft’s native hardware virtualization product. It allows you to create and run software versions of computers, known as virtual machines (VMs), directly on top of your Windows 11 host operating system. This is incredibly useful for developers who need to test software in isolated environments, IT professionals running Linux alongside Windows, or anyone who wants to experiment safely without risking their primary PC.

While you can enable Hyper-V by clicking through the legacy “Turn Windows features on or off” Control Panel menu, using PowerShell is significantly faster and easier to automate.

Prerequisites for Hyper-V

Before you run the command, your computer must meet strict hardware requirements:

  • You must be running Windows 11 Pro, Enterprise, or Education. Hyper-V is completely disabled and unavailable on Windows 11 Home.
  • Your CPU must support Hardware Virtualization (Intel VT-x or AMD-V), and it must be enabled in your computer’s BIOS/UEFI firmware settings.
  • You must have at least 4GB of RAM (though 8GB or more is highly recommended).

The PowerShell Command

To enable the Hyper-V hypervisor and all associated management tools, you must execute the command with elevated privileges.

  1. Click the Start button, type PowerShell, right-click it, and select Run as Administrator.
  2. Paste the following command into the prompt and press Enter:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Understanding the Syntax

  • Enable-WindowsOptionalFeature: The core cmdlet used to turn on legacy Windows features.
  • -Online: Tells PowerShell to apply the change to the currently running operating system (as opposed to an offline Windows image).
  • -FeatureName Microsoft-Hyper-V: Specifies the exact system name of the hypervisor feature.
  • -All: Automatically installs all necessary parent and child dependencies, including the Hyper-V Manager GUI and PowerShell modules, so you don’t have to install them separately.

Rebooting the System

Once the command reaches 100%, PowerShell will prompt you to restart the computer to finish applying the changes to the Windows kernel. Type Y and press Enter. After your PC reboots, you can click the Start menu, search for Hyper-V Manager, and begin creating your first virtual machine!

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.