Skip to content

Instantly share code, notes, and snippets.

@asford
Last active June 14, 2021 21:43
Show Gist options
  • Save asford/0b3a6cf4c03e3c3933d05c157de3c2a4 to your computer and use it in GitHub Desktop.
Save asford/0b3a6cf4c03e3c3933d05c157de3c2a4 to your computer and use it in GitHub Desktop.
Tyger Boxstarter
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
# OR
# Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots
#
# Learn more: http://boxstarter.org/Learn/WebLauncher
### Disable UAC for Session
Disable-UAC
### Install winget preview release
# From https://github.com/microsoft/winget-cli/releases/tag/v0.1.4331-preview
$winget_release = "https://github.com/microsoft/winget-cli/releases/download/v0.1.4331-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle"
Invoke-WebRequest -Uri $winget_release -OutFile ~/Downloads/Microsoft.DesktopAppInstaller.appxbundle -UseBasicParsing
Add-AppxPackage -Path ~/Downloads/Microsoft.DesktopAppInstaller.appxbundle
winget install --exact Microsoft.Edge
winget install --exact Quicklook
winget install --exact Microsoft.MouseandKeyboardCenter
winget install --exact Adobe.AdobeAcrobatReaderDC
winget install --exact Microsoft.WindowsTerminalPreview --version 1.2.2022.0
winget install zoom
# winget install --exact vim
winget install wox
winget install everything
winget install autohotkey
winget install miniconda
# WSL 2 Installation
# https://docs.microsoft.com/en-us/windows/wsl/install-win10
choco install VirtualMachinePlatform -source WindowsFeatures -y
choco install Microsoft-Windows-Subsystem-Linux -source WindowsFeatures -y
# https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel
$wsl2_kernel = "https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi"
Invoke-WebRequest -Uri $wsl2_kernel -OutFile ~/Downloads/wsl_update_x64.msi -UseBasicParsing
$wsl2_kernel_msi = Resolve-Path "~/Downloads/wsl_update_x64.msi" | select -ExpandProperty Path
msiexec /i $wsl2_kernel_msi /quiet
wsl --set-default-version 2
### Standard WSL Install
# choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures
# Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing
# Add-AppxPackage -Path ~/Ubuntu.appx
### run the distro once and have it install locally with a blank root user
# Ubuntu1804 install --root
### Install WSL and ubuntu-1804 container
# choco install wsl-ubuntu-1804
# choco pin add -n=wsl-ubuntu-1804
### User permissions for wsl-ubuntu-1804, see wsl-ubuntu-1804 package notes
# $path = "C:\ProgramData\chocolatey\lib\wsl-ubuntu-1804\tools\unzipped"
# $permissions = "BUILTIN\Users", 'FullControl', 'ContainerInherit,ObjectInherit', 'None', 'Allow'
#
# $existingAcl = Get-Acl -Path $path
# $rule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $permissions
# $existingAcl.SetAccessRule($rule)
# $existingAcl | Set-Acl -Path $path
### Primary Applications
# choco install microsoft-edge
# choco install quicklook
# choco install fluent-terminal
# choco install wsltty
# choco install microsoft-windows-terminal
###
# choco install autohotkey
### Command-line applications
# choco install gsudo
# choco install vim
### Enable UAC and Update
Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
### Rename Machine
$computername = "Tyger"
if ($env:computername -ne $computername) {
Rename-Computer -NewName $computername
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment