Last active
August 31, 2021 22:10
-
-
Save bartdorsey/e7bcd8a4a46db490f64e60be9685b4e2 to your computer and use it in GitHub Desktop.
Windows Development Boxstarter Script
This file contains 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
Write-Host @' | |
============================= | |
< Windows Subsystem for Linux > | |
< (Ubuntu >= 20.04) installer > | |
============================= | |
\ | |
\ | |
.--. | |
|o_o | | |
|:_/ | | |
// \ \ | |
(| | ) | |
/'\_ _/`\ | |
\___)=(___/ | |
'@ | |
if ([Environment]::OSVersion.Version.Major -ne 10) { | |
Write-Error 'Upgrade to Windows 10 before running this script' | |
Exit | |
} | |
if (!(Get-Command 'boxstarter' -ErrorAction SilentlyContinue)) { | |
Write-Error @' | |
You need Boxstarter to run this script; install with: | |
. { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force; refreshenv | |
'@ | |
Exit | |
} | |
#--- Windows Update --- | |
Enable-UAC | |
Enable-MicrosoftUpdate | |
#Install-WindowsUpdate -AcceptEula | |
if ((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ReleaseId -lt 1803) { | |
Write-Error 'You need to run Windows Update and install Feature Updates to at least version 1803' | |
Exit | |
} | |
#--- Windows Subsystems/Features --- | |
choco install Microsoft-Hyper-V-All -source WindowsFeatures -y | |
choco install Microsoft-Windows-Subsystem-Linux -source WindowsFeatures -y | |
ECHO Install Chocolatey | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | |
ECHO Configure chocolatey | |
choco feature enable -n allowGlobalConfirmation | |
ECHO Installing Windows Apps | |
ECHO Installing WSL2 | |
choco install wsl2 | |
ECHO Installing Ubuntu 2004 | |
choco install wsl-ubuntu-2004 | |
ECHO Installing Windows Terminal | |
choco install microsoft-windows-terminal | |
ECHO Installing Insomnia | |
choco install insomnia-rest-api-client | |
# -- Visual Studio Code | |
choco install VisualStudioCode | |
refreshenv | |
code --install-extension coenraads.bracket-pair-colorizer-2 | |
code --install-extension dbaeumer.vscode-eslint | |
code --install-extension ritwickdey.liveserver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment