Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Check for Windows 10 version 1607
- if ([int](Get-WmiObject -Class Win32_OperatingSystem).BuildNumber -lt 14393) {
- Write-Warning -Message "Unsupported build of Windows 10 detected, exiting" ; exit 1
- }
- # Enable Dev Mode
- $RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
- if (-not(Test-Path -Path $RegistryKeyPath)) {
- New-Item -Path $RegistryKeyPath -ItemType Directory -Force
- }
- New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1
- # Enable Bash
- Enable-WindowsOptionalFeature -FeatureName Microsoft-Windows-Subsystem-Linux -Online -All -LimitAccess -NoRestart -ErrorAction Stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement