replace dism.exe for CMD with builtin powershell module

This commit is contained in:
Baipyrus 2024-11-25 11:56:41 +01:00
parent cf885e7363
commit 0da955a90d

View File

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