Skip to content

Instantly share code, notes, and snippets.

@andrefcdias
Last active March 14, 2022 21:23
Show Gist options
  • Save andrefcdias/1b1949d437b1963041e8a3d955856351 to your computer and use it in GitHub Desktop.
Save andrefcdias/1b1949d437b1963041e8a3d955856351 to your computer and use it in GitHub Desktop.
#Requires -RunAsAdministrator
<# Coolest development environment setup script in the block (Part 2)
---------------------------------------------------------
What can I expect from this script?
Part 2 of the setup script, to be run after rebooting to activate WSL
This will:
- Finalize WSL setup
- Start development environment script in WSL
#>
# Set script to stop on errors
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction']='Stop'
echo "# Continuing the setup..."
echo ""
echo ""
echo "> Updating WSL kernel"
wsl --update
echo ""
echo "> Restarting WSL"
wsl --shutdown
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment