Skip to content

Instantly share code, notes, and snippets.

@HauptJ
Created December 26, 2017 19:39
Show Gist options
  • Save HauptJ/c1a592b5ba71c556b8f1b778974ff714 to your computer and use it in GitHub Desktop.
Save HauptJ/c1a592b5ba71c556b8f1b778974ff714 to your computer and use it in GitHub Desktop.
Installs Vagrant, Vagrant Manager, Packer and Windows Subsystem for Linux
############################################################
# Powershell provision personal Windows 10 environment
# Installs Vagrant, Vagrant Manager, Packer and Windows Subsystem for Linux
# Script 3
# Author: Joshua Haupt josh@hauptj.com Date: 25.12.2017
############################################################
##### Install Vagrant and Vagrant Manager #####
Write-Host "Installing Vagrant"
choco install vagrant -y
Write-Host "Installing Vagrant Manager"
choco install vagrant-manager -y
##### Install Packer #####
Write-Host "Installing Packer"
choco install packer -y
##### Enable Developer Mode #####
Write-Host "Enabling Developer Mode"
# Source: https://stackoverflow.com/questions/40033608/enable-windows-10-developer-mode-programmatically
# Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode
$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
if (-not(Test-Path -Path $RegistryKeyPath)) {
New-Item -Path $RegistryKeyPath -ItemType Directory -Force
}
# Add registry value to enable Developer Mode
New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1
##### Install Windows Subsystem for Linux #####
Write-Host "Enabling Windows Subsystem for Linux"
Enable-WindowsOptionalFeature -FeatureName Microsoft-Windows-Subsystem-Linux -Online -All -LimitAccess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment