Skip to content

Instantly share code, notes, and snippets.

@ranieuwe
Last active January 19, 2023 07:23
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ranieuwe/36b1fd84e379f1dd81a63a288308d4d9 to your computer and use it in GitHub Desktop.
Save ranieuwe/36b1fd84e379f1dd81a63a288308d4d9 to your computer and use it in GitHub Desktop.
Boxstarter bootstrap
# 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
Set-ExplorerOptions -showFileExtensions
# Config
Disable-GameBarTips
Disable-BingSearch
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
# Disable SMB1: https://blogs.technet.microsoft.com/filecab/2016/09/16/stop-using-smb1/
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart
# Install some Windows modules
dism.exe /online /add-capability /capabilityname:Language.Basic~~~nl-NL~0.0.1.0
dism.exe /online /add-capability /capabilityname:Tools.DeveloperMode.Core~~~~0.0.1.0
# Set up choco as a packageprovider too
Write-Host "Bootstrapping Chocolatey provider" -ForegroundColor Yellow
Get-PackageProvider -Name Chocolatey -ForceBootstrap | Out-Null
Write-Host "Trusting Chocolatey provider" -ForegroundColor Yellow
Set-PackageSource -Name chocolatey -Trusted -Force
# Install
cinst googlechrome
# Install Office 365
#$tmp = "$env:SystemDrive\temp\"
#Write-Host "Storing data in $tmp"
#Install-ChocolateyPackage 'officeClickToRun' 'exe' "/extract:$tmp\office /log:$tmp\officeInstall.log /quiet /norestart" 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_8008-3601.exe' -checksum 'A7F8CD73AD61EDDB42303E7D2A0D4F4080B8330267E7B6AD63C17F12926F04DD' -checksumType 'sha256'
#Invoke-WebRequest -Uri https://gist.githubusercontent.com/ranieuwe/6d690865858cca98721a177fe284dc90/raw/ -UseBasicParsing -Out "$tmp\office\custom.xml"
#Install-ChocolateyInstallPackage 'officeClickToRun' 'exe' "/download $tmp\office\custom.xml" "$tmp\office\setup.exe"
#Install-ChocolateyInstallPackage 'officeClickToRun' 'exe' "/configure $tmp\office\custom.xml" "$tmp\office\setup.exe"
cinst 7zip.install
cinst paint.net
cinst sysinternals
cinst spotify
#cinst visualstudiocode
cinst filezilla
#cinst putty.install
cinst firefox
#cinst notepadplusplus.install
#cinst nodejs.install
#cinst itunes
cinst microsoft-teams
#cinst git
#cinst git.install
cinst github-desktop
cinst docker-for-windows
#cinst kubernetes-cli
cinst azure-cli
cinst adobereader
cinst jre8
cinst vlc
#cinst procexp
#cinst fiddler4
cinst sql-server-management-studio
#cinst lastpass
cinst vcredist2008
cinst vcredist2010
cinst vcredist2012
cinst vcredist2013
cinst whatsapp
# Azure and MSFT kit
cinst powerbi
cinst microsoftazurestorageexplorer
#cinst wawsdeploy
cinst microsoft-r-open
cinst armclient
# Long running stuff
# cinst visualstudio2017enterprise --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US"
# Azure PS
Install-Package AzureRM -ProviderName Powershellget -AllowClobber -Force
# ----------------------------
# Uninstall things
# ----------------------------
$apps = @(
# default Windows 10 apps
"Microsoft.Appconnector"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingWeather"
"Microsoft.Getstarted"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftSolitaireCollection"
#"Microsoft.MicrosoftStickyNotes"
"Microsoft.Office.OneNote"
"Microsoft.People"
"Microsoft.SkypeApp"
#"Microsoft.Windows.Photos"
"Microsoft.WindowsAlarms"
#"Microsoft.WindowsCalculator"
#"Microsoft.WindowsCamera"
"Microsoft.WindowsMaps"
"Microsoft.WindowsSoundRecorder"
#"Microsoft.WindowsStore"
"Microsoft.XboxApp"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
"microsoft.windowscommunicationsapps"
"Microsoft.MinecraftUWP"
"Microsoft.NetworkSpeedTest"
# Threshold 2 apps
"Microsoft.Messaging"
#"Microsoft.WindowsFeedbackHub"
#Redstone apps
"Microsoft.BingFoodAndDrink"
"Microsoft.BingTravel"
"Microsoft.BingHealthAndFitness"
"Microsoft.WindowsReadingList"
# non-Microsoft
"9E2F88E3.Twitter"
"PandoraMediaInc.29680B314EFC2"
"Flipboard.Flipboard"
"ShazamEntertainmentLtd.Shazam"
"king.com.CandyCrushSaga"
"king.com.CandyCrushSodaSaga"
"king.com.*"
"ClearChannelRadioDigital.iHeartRadio"
"4DF9E0F8.Netflix"
"6Wunderkinder.Wunderlist"
"Drawboard.DrawboardPDF"
"2FE3CB00.PicsArt-PhotoStudio"
"D52A8D61.FarmVille2CountryEscape"
"TuneIn.TuneInRadio"
"GAMELOFTSA.Asphalt8Airborne"
#"TheNewYorkTimes.NYTCrossword"
"DB6EA5DB.CyberLinkMediaSuiteEssentials"
"Facebook.Facebook"
"flaregamesGmbH.RoyalRevolt2"
"Playtika.CaesarsSlotsFreeCasino"
"A278AB0D.MarchofEmpires"
"KeeperSecurityInc.Keeper"
"ThumbmunkeysLtd.PhototasticCollage"
"XINGAG.XING"
"89006A2E.AutodeskSketchBook"
"D5EA27B7.Duolingo-LearnLanguagesforFree"
"46928bounde.EclipseManager"
"ActiproSoftwareLLC.562882FEEB491" # next one is for the Code Writer from Actipro Software LLC
"DolbyLaboratories.DolbyAccess"
"SpotifyAB.SpotifyMusic"
"A278AB0D.DisneyMagicKingdoms"
"WinZipComputing.WinZipUniversal"
# apps which cannot be removed using Remove-AppxPackage
#"Microsoft.BioEnrollment"
#"Microsoft.MicrosoftEdge"
#"Microsoft.Windows.Cortana"
#"Microsoft.WindowsFeedback"
#"Microsoft.XboxGameCallableUI"
#"Microsoft.XboxIdentityProvider"
#"Windows.ContactSupport"
)
foreach ($app in $apps) {
Write-Output "Trying to remove $app"
Get-AppxPackage -Name $app | Remove-AppxPackage
Get-AppXProvisionedPackage -Online |
Where-Object DisplayName -EQ $app |
Remove-AppxProvisionedPackage -Online
}
# Customizations
# 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
# Move documents folder to OneDrive
Move-LibraryDirectory "Personal" "$env:UserProfile\OneDrive - Microsoft\Documents"
# Update the machine
# ----------------------------
# Update Windows and PS help files
# ----------------------------
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
Update-Help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment