Skip to content

Instantly share code, notes, and snippets.

@DanielSmon
Forked from jessfraz/boxstarter.ps1
Last active March 8, 2021 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanielSmon/1f76fcdb8f99c12bc4289e2aeeee2b2b to your computer and use it in GitHub Desktop.
Save DanielSmon/1f76fcdb8f99c12bc4289e2aeeee2b2b to your computer and use it in GitHub Desktop.
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# 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
#---- TEMPORARY ---
Disable-UAC
# Locale / time
Set-TimeZone "E. Australia Standard Time"
#--- Fonts ---
choco install inconsolata -y
# TODO Manual: Install Raleway from Google fonts:
# https://fonts.google.com/download?family=Raleway
#Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -All -NoRestart
#choco install wsl2
# does this need a reboot first after installing wsl2?
#choco install wsl-ubuntu-2004
choco install -y powershell-core
choco install -y git -params '"/WindowsTerminal"'
choco install -y nodejs
choco install -y sysinternals
#choco install -y ssms
choco install -y mousewithoutborders
choco install -y firefox-dev --pre
choco install -y docker-for-windows
choco install -y sharex # Screenshot tool
choco install -y microsoft-teams
choco install -y vscode-insiders
choco install -y hxd # Hex editor
choco install -y regshot # Registry/file change comparer
choco install -y treesizefree
choco install -y visualstudio2019community
#choco install -y visualstudio2019community -add Microsoft.VisualStudio.Workload.CoreEditor -add Microsoft.VisualStudio.Workload.Azure -add Microsoft.VisualStudio.Workload.ManagedDesktop -add Microsoft.VisualStudio.Workload.NetCoreTools -add Microsoft.VisualStudio.Workload.NetWeb -add Microsoft.VisualStudio.Workload.Node
choco install -y microsoft-windows-terminal
#choco install -y toggl
choco install -y screentogif
choco install -y obs-studio
choco install -y obs-virtualcam
choco install -y obs-move-transition
choco install -y vlc
choco install -y 7zip
choco install -y adobereader
choco install -y powertoys
choco install -y signal
choco install -y microsoftazurestorageexplorer
choco install -y azure-cli
#--- Windows Settings ---
Set-WindowsExplorerOptions `
-EnableShowHiddenFilesFoldersDrives `
-EnableShowProtectedOSFiles `
-EnableShowFileExtensions `
-EnableShowFullPathInTitleBar `
-EnableOpenFileExplorerToQuickAccess `
-EnableShowRecentFilesInQuickAccess `
-EnableShowFrequentFoldersInQuickAccess `
-EnableExpandToOpenFolder
Set-BoxstarterTaskbarOptions -Combine Always -AlwaysShowIconsOn
Set-BoxstarterTaskbarOptions -MultiMonitorOn -MultiMonitorMode Open -MultiMonitorCombine Always
# Privacy: Let apps use my advertising ID: Disable
If (-Not (Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo")) {
New-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo | Out-Null
}
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# Lock screen (not sleep) on lid close
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' -Name AwayModeEnabled -Type DWord -Value 1
# To Restore:
# Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' -Name AwayModeEnabled -Type DWord -Value 0
# Turn off search box in Taskbar
If (-Not (Test-Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Search")) {
New-Item -Path HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Search | Out-Null
}
Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name SearchboxTaskbarMode -Type DWord -Value 0
# Turn off cortana in Taskbar
If (-Not (Test-Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced")) {
New-Item -Path HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced | Out-Null
}
Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name ShowCortanaButton -Type DWord -Value 0
# Turn off task view button in Taskbar
If (-Not (Test-Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced")) {
New-Item -Path HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced | Out-Null
}
Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name ShowTaskViewButton -Type DWord -Value 0
# Don't show Edge tabs in Alt-Tab (only the window)
Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name MultiTaskingAltTabFilter -Type DWord -Value 3
#--- Restore Temporary Settings ---
Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
#--- Rename the Computer ---
# Requires restart, or add the -Restart flag
#$computername = "acidburn"
#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