Skip to content

Instantly share code, notes, and snippets.

@rscircus
Forked from ByronHawksmith/bootstrap-windows.ps1
Created August 3, 2022 10:34
Show Gist options
  • Save rscircus/7cddd9536756375492c2a30c2976ccfa to your computer and use it in GitHub Desktop.
Save rscircus/7cddd9536756375492c2a30c2976ccfa to your computer and use it in GitHub Desktop.
Windows 10 Developer Setup 2022
# Fork of https://gist.github.com/stungeye/4fd96987cbc9e0c6676e71cb14468660
# Allow running PowerShell scripts
Update-ExecutionPolicy Unrestricted
# 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'))
# Install Boxstarter
Set-ExecutionPolicy Unrestricted -Force
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
if (Test-PendingReboot) { Restart-Computer }
# Workaround for Chocolatey bug
# https://github.com/chocolatey/boxstarter/issues/241
$ChocoCachePath = "$env:USERPROFILE\AppData\Local\Temp\chocolatey"
New-Item -Path $ChocoCachePath -ItemType Directory -Force
$cup = 'choco upgrade --cacheLocation="$ChocoCachePath"'
# Show more info for files in Explorer
Set-WindowsExplorerOptions -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableShowHiddenFilesFoldersDrives
# Make Choco Always Accept
choco feature enable -n allowGlobalConfirmation
# Dev Tools
Invoke-Expression "$cup vscode"
Invoke-Expression "$cup microsoft-windows-terminal"
Invoke-Expression "$cup git"
Invoke-Expression "$cup postman"
Invoke-Expression "$cup visualstudio2022community"
Invoke-Expression "$cup sql-server-management-studio"
Invoke-Expression "$cup sql-server-express"
Invoke-Expression "$cup nvm"
Invoke-Expression "$cup virtualbox"
Invoke-Expression "$cup docker-cli"
Invoke-Expression "$cup openssh --pre"
Invoke-Expression "$cup scrcpy"
Invoke-Expression "$cup android-sdk"
Invoke-Expression "$cup gradle"
# Browser
Invoke-Expression "$cup googlechrome"
# Utils
Invoke-Expression "$cup 7zip"
Invoke-Expression "$cup hwinfo"
Invoke-Expression "$cup cpu-z"
Invoke-Expression "$cup powertoys"
Invoke-Expression "$cup which"
# Chat
Invoke-Expression "$cup microsoft-teams"
Invoke-Expression "$cup discord"
Invoke-Expression "$cup zoom"
Invoke-Expression "$cup slack"
# Audio/Video
Invoke-Expression "$cup obs-studio"
Invoke-Expression "$cup vlc"
Invoke-Expression "$cup spotify"
Invoke-Expression "$cup handbrake"
# Game Dev
Invoke-Expression "$cup blender"
Invoke-Expression "$cup godot"
# NPM post install steps
nvm install lts
nvm use lts
# Git && SSH post install steps
mkdir ~/.ssh
cd ~/.ssh
ssh-keygen -t rsa -C "[email protected]"
git config --global user.name "x"
git config --global user.email "[email protected]"
git config --global core.sshCommand "C:\Program Files\OpenSSH-Win64\ssh.exe"
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
ssh-add ~/.ssh/primary
# Configure windows Hyper-V virtualization
choco install Microsoft-Hyper-V-All -source windowsFeatures
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures
# No SMB1 - https://blogs.technet.microsoft.com/filecab/2016/09/16/stop-using-smb1/
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol
# Start Menu: Disable Bing Search Results
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 0
# To Restore (Enabled):
# Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 1
# Change Explorer home screen back to "This PC"
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Type DWord -Value 1
# Change it back to "Quick Access" (Windows 10 default)
# Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Type DWord -Value 2
if (Test-PendingReboot) { Restart-Computer }
# Cleanup
del C:\eula*.txt
del C:\install.*
del C:\vcredist.*
del C:\vc_red.*

Statements should be executed in an Administrator PowerShell session.

Execute each statement one by one. This isn't configured to be run as a script.

Also remember to configure git for your own name/email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment