Last active
March 14, 2019 16:17
-
-
Save tats-u/9aa7009c67f0454ddf7a88ce528a8299 to your computer and use it in GitHub Desktop.
WSL有効化PowerShellスクリプト(管理者権限で実行してください)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wsl_state = (Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux).State | |
if ($wsl_state) { | |
Write-Output "WSL has already been enabled." | |
exit(0) | |
} | |
if ($wsl_state -eq $null) { | |
Write-Output "WSL cannot be enabled because it doesn't exist on your PC. Update it to the latest Windows 10." | |
exit(1) | |
} | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment