Last active
July 2, 2019 07:26
-
-
Save apollux/3150a28a92d6fb41c20560e7b4628181 to your computer and use it in GitHub Desktop.
Boxstarter script
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
function Is-Installed( $program ) { | |
$x86 = ((Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall") | | |
Where-Object { $_.GetValue( "DisplayName" ) -like "*$program*" } ).Length -gt 0; | |
$x64 = ((Get-ChildItem "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall") | | |
Where-Object { $_.GetValue( "DisplayName" ) -like "*$program*" } ).Length -gt 0; | |
return $x86 -or $x64; | |
} | |
###################### | |
# Configure Chocolatey | |
###################### | |
choco config set --name=cacheLocation --value=C:\ChocolateyCache | |
choco feature enable --name=allowGlobalConfirmation | |
choco feature enable --name=useRememberedArgumentsForUpgrades | |
################## | |
# Privacy Settings | |
################## | |
# Privacy: Let apps use my advertising ID: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
# To Restore: | |
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
# Privacy: SmartScreen Filter for Store Apps: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 | |
# To Restore: | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 1 | |
# WiFi Sense: HotSpot Sharing: Disable | |
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 | |
# 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 | |
# Start Menu: Disable Bing Search Results | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 0 | |
# To Restore (Enabled): | |
# Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 1 | |
############################ | |
# Personal Preferences on UI | |
############################ | |
# 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 | |
Set-WindowsExplorerOptions ` | |
-EnableShowHiddenFilesFoldersDrives ` | |
-EnableShowFileExtensions ` | |
-DisableOpenFileExplorerToQuickAccess ` | |
-DisableShowRecentFilesInQuickAccess ` | |
-DisableShowFrequentFoldersInQuickAccess | |
Set-TaskbarOptions ` | |
-Dock Bottom ` | |
-Combine Always ` | |
-AlwaysShowIconsOff ` | |
-Size Small | |
Set-TaskbarOptions -Lock | |
############################### | |
# Windows 10 Metro App Removals | |
# These start commented out so you choose | |
# Just remove the # (comment in PowerShell) on the ones you want to remove | |
############################### | |
# Be gone, heathen! | |
Get-AppxPackage king.com.CandyCrushSaga | Remove-AppxPackage | |
# Bing Weather, News, Sports, and Finance (Money): | |
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage | |
# Xbox: | |
Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage | |
# Windows Phone Companion | |
Get-AppxPackage Microsoft.WindowsPhone | Remove-AppxPackage | |
# Solitaire Collection | |
Get-AppxPackage Microsoft.MicrosoftSolitaireCollection | Remove-AppxPackage | |
# People | |
Get-AppxPackage Microsoft.People | Remove-AppxPackage | |
# Groove Music | |
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage | |
# Movies & TV | |
Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage | |
# OneNote | |
Get-AppxPackage Microsoft.Office.OneNote | Remove-AppxPackage | |
# Photos | |
#Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage | |
# Sound Recorder | |
Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage | |
# Mail & Calendar | |
Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage | |
# Skype (Metro version) | |
#Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage | |
################## | |
# Windows Features | |
################## | |
choco install Microsoft-Hyper-V-All --source windowsfeatures | |
choco install Microsoft-Windows-Subsystem-Linux --source windowsfeatures | |
Enable-RemoteDesktop | |
################## | |
# Visual Studio | |
################## | |
if ( -Not (Is-Installed "Visual Studio Professional 2019")) { | |
$vsDownloadUrl = "https://download.visualstudio.microsoft.com/download/pr/4cb5ea57-80b3-4227-b1a4-ab523785d4cf/069c3131ce1b82f07af782d030c0c2d5/vs_professional.exe" | |
$vsInstallerPath = "~/Downloads/vs-2019-installer.exe" | |
Invoke-WebRequest $vsDownloadUrl -OutFile $vsInstallerPath | |
Start-Process -Wait -FilePath $vsInstallerPath -ArgumentList "--passive", "--wait", "--norestart", "--add Microsoft.VisualStudio.Workload.ManagedDesktop;includeRecommended;includeOptional", "--add Microsoft.VisualStudio.Workload.NetCoreTools;includeRecommended;includeOptional" | |
} | |
############################# | |
# Install Chocolatey Packages | |
############################# | |
choco install git -y | |
choco install 7zip -y | |
choco install nuget.commandline -y | |
choco install curl -y | |
choco install sysinternals -y | |
choco install googlechrome -y | |
choco install visualstudiocode -y | |
choco install docker-for-windows -y | |
choco install linqpad -y | |
choco install paint.net -y | |
choco install vlc -y | |
choco install dotPeek -y | |
choco install Firefox -y | |
choco install foxitreader -y | |
choco install hot-chocolatey -y | |
choco install openjdk11 -y | |
choco install keepassxc -y | |
choco install lockhunter -y | |
choco install maven -y | |
choco install msbuild.communitytasks -y | |
choco install nmap -y | |
choco install nodejs-lts -y | |
choco install notepadplusplus -y | |
choco install nunit -y | |
choco install postman -y | |
choco install P4Merge -y | |
choco install slack -y | |
choco install spacesniffer -y | |
choco install teamviewer -y | |
choco install toggl -y | |
choco install tortoisehg --version 4.0.2 -y | |
choco install windbg -y | |
choco install WinPcap -y | |
choco install wireshark -y | |
choco install yarn -y | |
choco install spotify -y | |
choco install resharper -y | |
choco install nextcloud-client -y | |
choco install pencil -y | |
############################# | |
# Install Visual Studio Code extensions | |
############################# | |
code --install-extension CoenraadS.bracket-pair-colorizer-2 | |
code --install-extension DavidAnson.vscode-markdownlint | |
code --install-extension eamodio.gitlens | |
code --install-extension joelday.docthis | |
code --install-extension ms-vscode.powershell | |
code --install-extension ms-azuretools.vscode-docker | |
code --install-extension stkb.rewrap | |
code --install-extension streetsidesoftware.code-spell-checker | |
code --install-extension yzhang.markdown-all-in-one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment