Enable-PnPWsl2
SYNOPSIS
Enables the necessary features for running the Windows Subsystem for Linux 2 (WSL2).
SYNTAX
Enable-PnPWsl2 [-ProgressAction <ActionPreference>]
DESCRIPTION
The Enable-PnPWsl2 function enables the required features for running WSL2. It checks if the cmdlet is running with administrator privileges and then enables the 'Microsoft-Windows-Subsystem-Linux' and 'VirtualMachinePlatform' features. Finally, it restarts the computer to apply the changes.
EXAMPLE 1
Enable-PnPWsl2