Skip to content

Instantly share code, notes, and snippets.

@ernestohs
Created June 30, 2022 03:27
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 ernestohs/93926c55477a3381317ff07b9f2eaeb2 to your computer and use it in GitHub Desktop.
Save ernestohs/93926c55477a3381317ff07b9f2eaeb2 to your computer and use it in GitHub Desktop.
For boxstarter.org to be consumed
##########################################################################
# Disable UAC (temporarily)
##########################################################################
Disable-UAC
##########################################################################
# Windows settings
##########################################################################
# Enable long paths
Set-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Control\FileSystem" -Name LongPathsEnabled -Type DWord -Value 1
Disable-BingSearch
Disable-GameBarTips
Set-WindowsExplorerOptions -EnableShowFileExtensions
Set-TaskbarOptions -Size Large -Dock Bottom -Combine Full -Lock
##########################################################################
# Power settings
##########################################################################
# powercfg /change monitor-timeout-ac 0 # Don't turn off monitor
# powercfg /change standby-timeout-ac 0 # Don't ever sleep
##########################################################################
# Windows subsystem for Linux
##########################################################################
choco install Microsoft-Hyper-V-All -source windowsFeatures -y
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures -y
##########################################################################
# Applications
##########################################################################
choco install googlechrome -y
choco install brave -y
choco install geforce-experience -y
##########################################################################
# Core Development
##########################################################################
choco install nodejs -y
choco install nvm -y
choco install vscode -y
choco install git -y
##########################################################################
# Software Development Tools
##########################################################################
##########################################################################
# Web Development Tools
##########################################################################
choco install googlechrome.canary -y
choco install ethanbrown.chromecanarydevextensions -y
choco install postman -y
##########################################################################
# Mobile Development
##########################################################################
# choco install androidstudio -y
choco install scrcpy -y
##########################################################################
# Tools
##########################################################################
choco install 7zip.install -y
choco install sysinternals -y
choco install oh-my-posh -y
choco install microsoft-windows-terminal -y
choco install windirstat -y
choco install ditto -y
choco install paint.net -y
choco install powertoys -y
choco install obs-studio -y
choco install beyondcompare -y
##########################################################################
# Communications
##########################################################################
choco install slack -y
choco install zoom -y
##########################################################################
# Fonts
##########################################################################
choco install font-nerd-dejavusansmono -y
choco install nerd-fonts-3270 -y
choco install font-hackgen-nerd -y
choco install font-firge-nerd -y
choco install firanf -y
choco install cascadia-code-nerd-font -y
choco install nerdfont-hack -y
choco install victormononf -y
choco install firacodenf -y
choco install jetbrainsmononf -y
choco install cica -y
choco install terminal-icons.powershell -y
choco install nerd-fonts-delugiabook -y
choco install nerd-fonts-delugiapowerline -y
choco install nerd-fonts-delugiacomplete -y
choco install nerd-fonts-agave -y
choco install nerd-fonts-delugiamono-powerline -y
choco install nerd-fonts-delugiamono-complete -y
choco install font-awesome-font -y
choco install font-hackgen -y
choco install chocolatey-font-helpers.extension -y
choco install firacode -y
$settingsFile = "C:\users\$env:UserName\AppData\Local\Packages\Microsoft.WindowsTerminal_*\LocalState\settings.json"
if((Test-Path -Path $settingsFile)) {
$settings = Get-Content -Path $settingsFile | ConvertFrom-Json
if(!$settings) { break; }
# Set the font face
if($settings.profiles -and $settings.profiles.defaults) {
$fontFace = @{face="CaskaydiaCove NF"}
$settings.profiles.defaults | Add-Member -NotePropertyName "font" -NotePropertyValue $fontFace -Force
}
# Set the newest PowerShell as the default profile
$powershellProfile = $settings.profiles.list | Where-Object {$_.name -eq "PowerShell"}
if($powershellProfile -and $powershellProfile.guid -and $settings.defaultProfile) {
$settings.defaultProfile = $powershellProfile.guid
}
$settings | ConvertTo-Json -Depth 100 | Out-File -FilePath $settingsFile -Encoding utf8 -Force
}
##########################################################################
# Virtualization
##########################################################################
choco install docker-for-windows -y
##########################################################################
# VSCode extensions
##########################################################################
code --install-extension wmaurer.change-case
code --install-extension ms-azuretools.vscode-docker
code --install-extension ritwickdey.LiveServer
code --install-extension esbenp.prettier-vscode
code --install-extension dbaeumer.vscode-eslint
code --install-extension eamodio.gitlens
code --install-extension ms-vscode-remote.remote-wsl
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension MS-vsliveshare.vsliveshare
code --install-extension christian-kohler.path-intellisense
code --install-extension streetsidesoftware.code-spell-checker
code --install-extension pranaygp.vscode-css-peek
code --install-extension mikestead.dotenv
code --install-extension johnpapa.vscode-peacock
code --install-extension kamikillerto.vscode-colorize
##########################################################################
# Uninstall stuff
##########################################################################
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage
Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage
Get-AppxPackage *Autodesk* | Remove-AppxPackage
Get-AppxPackage *BubbleWitch* | Remove-AppxPackage
Get-AppxPackage king.com.CandyCrush* | Remove-AppxPackage
Get-AppxPackage Microsoft.WindowsMaps | Remove-AppxPackage
Get-AppxPackage *Netflix* | Remove-AppxPackage
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage
Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage
Get-AppxPackage Microsoft.Microsoft3DViewer | Remove-AppxPackage
Get-AppxPackage Microsoft.MixedReality.Portal | Remove-AppxPackage
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage
Get-AppxPackage Microsoft.YourPhone | Remove-AppxPackage
Get-AppxPackage Microsoft.MSPaint | Remove-AppxPackage
Get-AppxPackage Microsoft.MicrosoftSolitaireCollection | Remove-AppxPackage
##########################################################################
# Privacy
##########################################################################
# 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
# WiFi Sense: HotSpot Sharing: Disable
If (-Not (Test-Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting")) {
New-Item -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting | Out-Null
}
Set-ItemProperty -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting -Name value -Type DWord -Value 0
# WiFi Sense: Shared HotSpot Auto-Connect: Disable
Set-ItemProperty -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots -Name value -Type DWord -Value 0
##########################################################################
# User interface
##########################################################################
# Change Explorer home screen back to "This PC"
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Type DWord -Value 1
# Start Menu: Disable Bing Search Results
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 0
# Turn off People in Taskbar
If (-Not (Test-Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People")) {
New-Item -Path HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People | Out-Null
}
Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name PeopleBand -Type DWord -Value 0
# Disable the Lock Screen (the one before password prompt - to prevent dropping the first character)
If (-Not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization)) {
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name Personalization | Out-Null
}
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1
##########################################################################
# Restore Temporary Settings
##########################################################################
Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
Rename-Computer -NewName "TARS"
# 0 1 0
# 0 0 1
# 1 1 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment