diff --git a/util/wsl.psm1 b/util/wsl.psm1 index 47fa620..1128e30 100644 --- a/util/wsl.psm1 +++ b/util/wsl.psm1 @@ -1,8 +1,8 @@ function InstallWSL { # Reference: https://learn.microsoft.com/en-us/windows/wsl/install-manual - dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart - dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart + Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -All -NoRestart + Enable-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform" -All -NoRestart wsl.exe --install --no-distribution wsl.exe --set-default-version 2 }