Skip to content

Instantly share code, notes, and snippets.

@v1ct0rv
Last active September 9, 2020 03:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save v1ct0rv/75ef89362da1fdb3c0a48e298f049ed3 to your computer and use it in GitHub Desktop.
Save v1ct0rv/75ef89362da1fdb3c0a48e298f049ed3 to your computer and use it in GitHub Desktop.
Boxstarter powershell script
# This script is based on jessfraz boxstarter.ps1 script https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# and NickCraver Windows10-Setup.ps1 script https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9
# all the configurations here are my personal preferences, use it at your own discretion.
# the configurations here are meant to be run by boxstarter, and some will not work when running the ps1 by itself
##################
# Temporal: Disable UAC
##################
Disable-UAC
##################
# Windows update
##################
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
##################
# Windows Settings
##################
# Bing search and game bar
Disable-BingSearch
Disable-GameBarTips
# Explorer options
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -DisableShowRecentFilesInQuickAccess -DisableOpenFileExplorerToQuickAccess
# 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
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -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
# Start Menu: Disable Bing Search Results
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 0
# Disable Telemetry (requires a reboot to take effect)
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWord -Value 0
Get-Service DiagTrack,Dmwappushservice | Stop-Service | Set-Service -StartupType Disabled
# Disable Xbox Gamebar
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name AppCaptureEnabled -Type DWord -Value 0
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name GameDVR_Enabled -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 P2P Update downlods outside of local network
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config -Name DODownloadMode -Type DWord -Value 1
# Set long file names
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name LongPathsEnabled -Type DWord -Value 1
##################
# Windows Features
##################
# Windows Subsystem for Linux
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures
# .NET Framework 3.5
choco install NetFx3 -source windowsfeatures
# Windows Projected File System
choco install Client-ProjFS -source windowsfeatures
# Internet Explorer
choco uninstall Internet-Explorer-Optional-amd64 -source windowsfeatures
##################
# App install
##################
# web browsers
choco install firefox -y
choco install googlechrome -y
# video and music
choco install vlc -y
# editors
choco install notepadplusplus.install -y
choco install vscode -y --params "/NoDesktopIcon"
# git & clients
choco install git.install -y --params "/SChannel"
choco install poshgit -y
choco install gitkraken -y
# consoles
choco install putty.install -y
choco install cmdermini -y
# tools
choco install sysinternals -y
choco install windirstat -y
choco install totalcommander -y
choco install dbeaver -y
choco install jetbrainstoolbox -y
# network / debugging proxys
choco install wireshark -y
choco install fiddler -y
choco install postman -y
# SDKs
choco install jdk10 -y
choco install dotnetcore-sdk -y
choco install windows-sdk-10.1 -y
choco install python2 -y -v --params '"/InstallDir:C:\tools\python2"'
choco install python3 -y -v --params '"/InstallDir:C:\tools\python3"'
# clis
choco install nodejs.install -y
choco install kubernetes-cli -y
# Load Testing
choco install gatling -y
# others
choco install foxitreader -y
choco install maven -y
choco install sharex -y
choco install dropbox -y
# Messaging
choco install slack -y
choco install zoom -y
choco install whatsapp -y
# Virtualization
switch ( $env:BoxstarterVirtualizationTool )
{
VirtualBox
{
Write-BoxstarterMessage "Installing virtualbox"
choco install virtualbox -y
}
VMware
{
Write-BoxstarterMessage "Installing VmWare Workstation"
choco install vmwareworkstation -y
}
}
# IDES
switch ( $env:BoxstarterVSVersion )
{
Community
{
Write-BoxstarterMessage "Installing Visual Studio Community Edition"
choco install -y visualstudio2017community --package-parameters "--add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.NetCoreTools --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Universal --includeRecommended --includeOptional --passive --locale en-US"
}
Professional
{
Write-BoxstarterMessage "Installing Visual Studio Professional Edition"
choco install -y visualstudio2017professional --package-parameters "--add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.NetCoreTools --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Universal --includeRecommended --includeOptional --passive --locale en-US"
}
Enterprise
{
Write-BoxstarterMessage "Installing Visual Studio Enterprise Edition"
choco install -y visualstudio2017enterprise --package-parameters "--add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.NetCoreTools --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Universal --includeRecommended --includeOptional --passive --locale en-US"
}
}
# Gaming
if($env:BoxstarterInstallGamingPackage -eq "true")
{
Write-BoxstarterMessage "Installing Gaming Tools"
choco install -y discord
choco install -y steam
choco install -y origin
choco install -y battle.net
choco install -y epicgameslauncher
choco install -y f.lux
}
else
{
Write-BoxstarterMessage "Skipping Gaming Tools"
}
##################
# Remove the kraken!
##################
# 3D Builder
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage
# Alarms
Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage
# Autodesk
Get-AppxPackage *Autodesk* | Remove-AppxPackage
# Bing Weather, News, Sports, and Finance (Money):
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage
Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage
Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage
# BubbleWitch
Get-AppxPackage *BubbleWitch* | Remove-AppxPackage
# Candy Crush
Get-AppxPackage king.com.CandyCrush* | Remove-AppxPackage
# Comms Phone
Get-AppxPackage Microsoft.CommsPhone | Remove-AppxPackage
# Dell
Get-AppxPackage *Dell* | Remove-AppxPackage
# Facebook
Get-AppxPackage *Facebook* | Remove-AppxPackage
# Feedback Hub
Get-AppxPackage Microsoft.WindowsFeedbackHub | Remove-AppxPackage
# Get Started
Get-AppxPackage Microsoft.Getstarted | Remove-AppxPackage
# Keeper
Get-AppxPackage *Keeper* | Remove-AppxPackage
# Mail & Calendar
Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage
# Maps
Get-AppxPackage Microsoft.WindowsMaps | Remove-AppxPackage
# March of Empires
Get-AppxPackage *MarchofEmpires* | Remove-AppxPackage
# Messaging
Get-AppxPackage Microsoft.Messaging | Remove-AppxPackage
# Minecraft
Get-AppxPackage *Minecraft* | Remove-AppxPackage
# Netflix
Get-AppxPackage *Netflix* | Remove-AppxPackage
# Office Hub
Get-AppxPackage Microsoft.MicrosoftOfficeHub | Remove-AppxPackage
# One Connect
Get-AppxPackage Microsoft.OneConnect | Remove-AppxPackage
# OneNote
Get-AppxPackage Microsoft.Office.OneNote | Remove-AppxPackage
# People
Get-AppxPackage Microsoft.People | Remove-AppxPackage
# Phone
Get-AppxPackage Microsoft.WindowsPhone | Remove-AppxPackage
# Photos
Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage
# Plex
Get-AppxPackage *Plex* | Remove-AppxPackage
# Skype (Metro version)
Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage
# Sound Recorder
Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage
# Solitaire
Get-AppxPackage *Solitaire* | Remove-AppxPackage
# Sticky Notes
Get-AppxPackage Microsoft.MicrosoftStickyNotes | Remove-AppxPackage
# Sway
Get-AppxPackage Microsoft.Office.Sway | Remove-AppxPackage
# Twitter
Get-AppxPackage *Twitter* | Remove-AppxPackage
# Xbox
Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage
Get-AppxPackage Microsoft.XboxIdentityProvider | Remove-AppxPackage
Get-AppxPackage Microsoft.XboxGameOverlay | Remove-AppxPackage
Get-AppxPackage Microsoft.XboxGamingOverlay | Remove-AppxPackage
Get-AppxPackage Microsoft.XboxSpeechToTextOverlay | Remove-AppxPackage
Get-AppxPackage Microsoft.Xbox.TCUI | Remove-AppxPackage
# Zune Music, Movies & TV
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage
Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage
# Advertising
Get-AppxPackage Microsoft.Advertising.Xaml | Remove-AppxPackage
# Solitaire
Get-AppxPackage Microsoft.MicrosoftSolitaireCollection | Remove-AppxPackage
# Print3D
Get-AppxPackage Microsoft.Print3D | Remove-AppxPackage
# HiddenCityMysteryofShadows
Get-AppxPackage *HiddenCity* | Remove-AppxPackage
# DolbyLaboratories
Get-AppxPackage *Dolby* | Remove-AppxPackage
# Minecraft
Get-AppxPackage Microsoft.MinecraftUWP | Remove-AppxPackage
##################
# Miscellaneous
##################
# Set SSH environment virables to use Windows Open SSH, to consolidate only one SSH version
setx GIT_SSH 'C:\Windows\System32\OpenSSH\ssh.exe' /m
setx SVN_SSH 'C:\Windows\System32\OpenSSH\ssh.exe' /m
# Start the Windows Open SSH agent
Set-Service -Name ssh-agent -StartupType Automatic
Start-Service -Name ssh-agent
##################
# Temporal: Enable UAC
##################
Enable-UAC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment