Open PowerShell as an administrator, copy paste the below line.
```powershell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
```
You will be prompted for a reboot if features are not already enabled. Press Y to reboot. Press N to reboot later.
For documentation on `Enable-WindowsOptionalFeature` see: [Enable-WindowsOptionalFeature (DISM) | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/dism/enable-windowsoptionalfeature?view=windowsserver2022-ps)