mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-25 10:51:46 +00:00
replace dism.exe for CMD with builtin powershell module
This commit is contained in:
parent
cf885e7363
commit
0da955a90d
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user