Hyper-V and WSL 2 require hardware virtualisation (Intel VT-x / AMD-V) enabled in firmware. Hyper-V can conflict with VirtualBox, VMware, or other hypervisors.
What you will achieve
Install Windows optional features such as WSL 2, Hyper-V, or legacy .NET frameworks through Settings or PowerShell without a full reinstall.
1) Install from Settings
- Open Settings → Apps → Optional features (Windows 11) or Settings → Apps → Optional features then More Windows features.
- Click View features, search for Windows Subsystem for Linux, Hyper-V, or Virtual Machine Platform.
- Check the box, click Next, then Install. Reboot when prompted.
2) Install via PowerShell (Admin)
Open Terminal (Admin) with Win + X:
Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -match 'Hyper|Virtual|WSL'}
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -All
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -All
3) Complete WSL 2 setup
- After optional features install, run:
wsl --install(downloads the default Linux distro). - Set WSL 2 as default:
wsl --set-default-version 2. - Verify with
wsl -l -v— VERSION should show 2.
4) Enable Hyper-V (Pro/Enterprise)
- Open Windows Features by running
optionalfeatures.exe. - Tick Hyper-V including Hyper-V Management Tools, click OK, and reboot.
- After reboot, launch Hyper-V Manager from Start to create virtual machines.
5) Remove optional features cleanly
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Removing WSL does not delete Linux distros immediately — unregister with
wsl --unregister <name>first.
6) .NET Framework 3.5 legacy apps
optionalfeatures.exe→ tick .NET Framework 3.5 (includes .NET 2.0 and 3.0).- Windows may pull files from Windows Update if not on the install image — connect to internet during enable.
7) Hyper-V prerequisites checklist
- 64-bit CPU with SLAT, virtualisation enabled in BIOS, minimum 4 GB RAM free for host + VM.
- Disable Memory Integrity temporarily if Hyper-V install fails on some builds: Windows Security → Device security → Core isolation.
8) Verify feature state
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
9) Sandbox and Containers
Beyond WSL and Hyper-V, optional features include Windows Sandbox ( lightweight disposable VM) and Containers for Windows Server-style container runtime on Pro/Enterprise.
- Enable Sandbox:
Enable-WindowsOptionalFeature -Online -FeatureName Containers-DisposableClientVM -Allthen reboot. - Launch from Start — each session is clean; no persistence between runs.
- Hyper-V must be enabled for Sandbox — same virtualisation prerequisites apply.