Last active
October 26, 2023 18:09
-
-
Save dangmai/f3c30a601099bb0e6ee0dc24b2713180 to your computer and use it in GitHub Desktop.
Boxstarter Windows Workstation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open in IE: https://boxstarter.org/package/url?https://gist.githubusercontent.com/dangmai/f3c30a601099bb0e6ee0dc24b2713180/raw/boxstarter.ps1 | |
# Prompt for inputs | |
$pcName = Read-Host 'Specify PC Name' | |
$jumpcloudconnectKey = Read-Host 'Specify JumpCloud Connect Key' | |
#---- TEMPORARY --- | |
Disable-UAC | |
#--- Windows Settings --- | |
Disable-BingSearch | |
Disable-GameBarTips | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions | |
# Set host name | |
Rename-Computer -NewName $pcName | |
if (Test-PendingReboot) { | |
Invoke-Reboot | |
} | |
# Install JumpCloud | |
Invoke-WebRequest 'https://raw.githubusercontent.com/TheJumpCloud/support/master/scripts/windows/InstallWindowsAgent.ps1' -OutFile 'jumpcloud.ps1' | |
./jumpcloud.ps1 -JumpCloudConnectKey $jumpcloudconnectKey | |
# Install auto updating software, remember to uninstall at the end of the script | |
choco install spotify | |
choco install vscode | |
choco install firefox | |
choco install intellijidea-ultimate | |
choco install GoogleChrome | |
choco install steam | |
# Install dev softwares | |
choco install git | |
choco install git-credential-manager-for-windows | |
choco install nvm | |
choco install yarn | |
choco install jq | |
choco install postman | |
choco install adoptopenjdk11 | |
choco install tortoisegit # This has PuttyGen and Pageant | |
choco install 7zip | |
choco install adb | |
choco install displayfusion | |
choco install ds4windows | |
choco install flashplayerplugin | |
choco install greenshot | |
choco install intel-xtu | |
choco install msiafterburner | |
choco install procexp | |
choco install vlc | |
choco install zerotier-one | |
choco install VibranceGUI | |
choco install adobereader | |
choco install unikey | |
# These are used to run and auto mount rclone on start up | |
choco install rclone | |
choco install winfsp | |
choco install nssm | |
#--- Uninstall unecessary applications that come with Windows out of the box --- | |
# 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 | |
# Dropbox | |
Get-AppxPackage *Dropbox* | Remove-AppxPackage | |
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 | |
# McAfee Security | |
Get-AppxPackage *McAfee* | Remove-AppxPackage | |
# Uninstall McAfee Security App | |
$mcafee = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "McAfee Security" } | select UninstallString | |
if ($mcafee) { | |
$mcafee = $mcafee.UninstallString -Replace "C:\Program Files\McAfee\MSC\mcuihost.exe","" | |
Write "Uninstalling McAfee..." | |
start-process "C:\Program Files\McAfee\MSC\mcuihost.exe" -arg "$mcafee" -Wait | |
} | |
# 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 | |
Get-AppxPackage *Twitter* | Remove-AppxPackage | |
# Xbox | |
Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage | |
Get-AppxPackage Microsoft.XboxIdentityProvider | Remove-AppxPackage | |
# Zune Music, Movies & TV | |
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage | |
Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage | |
# Farm Hero Saga | |
Get-AppxPackage *FarmHeroesSaga* | Remove-AppxPackage | |
# Your Phone | |
Get-AppxPackage *YourPhone* | Remove-AppxPackage | |
# Snip and Sketch | |
Get-AppxPackage *ScreenSketch* | Remove-AppxPackage | |
# Microsoft 3D Viewer | |
Get-AppxPackage Microsoft.Microsoft3DViewer | Remove-AppxPackage | |
# Microsoft GetHelp | |
Get-AppxPackage Microsoft.GetHelp | Remove-AppxPackage | |
#--- Windows Settings --- | |
# Some from: @NickCraver's gist https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9 | |
# 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 | |
# 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) | |
# Note this may break Insider builds for your organization | |
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 | |
#--- Windows Subsystems/Features --- | |
choco install Microsoft-Hyper-V-All -source windowsFeatures | |
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures | |
# Remove self-updating programs, we do this as the last step so that they don't need to be reinstalled | |
# if the PC restarts during bootstrapping | |
choco uninstall spotify --skip-powershell --skip-autouninstaller | |
choco uninstall vscode --skip-powershell --skip-autouninstaller | |
choco uninstall firefox --skip-powershell --skip-autouninstaller | |
choco uninstall intellijidea-ultimate --skip-powershell --skip-autouninstaller | |
choco uninstall GoogleChrome --skip-powershell --skip-autouninstaller | |
choco uninstall steam --skip-powershell --skip-autouninstaller | |
#--- Restore Temporary Settings --- | |
Enable-UAC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
check status for package (choco search: https://github.com/MrDKOz/HandyScripts/blob/12295ca13bf180612c2fb61c0710aaf8143eacfe/app-installer.ps1)