Skip to content

Instantly share code, notes, and snippets.

@danielscholl
Created February 25, 2020 16:49
Show Gist options
  • Save danielscholl/d98b3c1d301b1bb234b6566bf2bedf1f to your computer and use it in GitHub Desktop.
Save danielscholl/d98b3c1d301b1bb234b6566bf2bedf1f to your computer and use it in GitHub Desktop.
#Install Chocolatey
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
#Assign Chocolatey Packages to Install
$Packages = `
'git', `
'microsoft-edge', `
'visualstudiocode', `
'docker-desktop'
#Install Packages
ForEach ($PackageName in $Packages)
{ choco install $PackageName -y }
# User to Docker Group
Add-LocalGroupMember -Group "docker-users" -Member "azureuser"
#Install Azure PowerShell
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Set-ExecutionPolicy Bypass -Scope Process -Force; Install-Module -Name Az -AllowClobber -Scope AllUsers -Force
#Install Azure CLI for Windows
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
#Enable WSL
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
#Download and Install Ubuntu
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing
Add-AppxPackage -Path ~/Ubuntu.appx
#Reboot
Restart-Computer -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment