Created
April 18, 2019 18:47
-
-
Save joaocgreis/32f3f1314feb24951a0cffb6b77d1ca4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# To install, run this in PowerShell: | |
# Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); get-boxstarter -Force; Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/joaocgreis/32f3f1314feb24951a0cffb6b77d1ca4/raw/boxcleaner.txt | |
# Ignore errors | |
$ErrorActionPreference = 'Continue' | |
#--- Uninstall unecessary applications that come with Windows out of the box --- | |
try { | |
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage | |
Get-AppxPackage *Autodesk* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage | |
Get-AppxPackage *BubbleWitch* | Remove-AppxPackage | |
Get-AppxPackage king.com.CandyCrush* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.CommsPhone | Remove-AppxPackage | |
Get-AppxPackage *Dell* | Remove-AppxPackage | |
Get-AppxPackage *Dropbox* | Remove-AppxPackage | |
Get-AppxPackage *Facebook* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsFeedbackHub | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Getstarted | Remove-AppxPackage | |
Get-AppxPackage *Keeper* | Remove-AppxPackage | |
Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsMaps | Remove-AppxPackage | |
Get-AppxPackage *MarchofEmpires* | Remove-AppxPackage | |
Get-AppxPackage *McAfee* | Remove-AppxPackage | |
$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 | |
} | |
Get-AppxPackage Microsoft.Messaging | Remove-AppxPackage | |
Get-AppxPackage *Minecraft* | Remove-AppxPackage | |
Get-AppxPackage *Netflix* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.MicrosoftOfficeHub | Remove-AppxPackage | |
Get-AppxPackage Microsoft.OneConnect | Remove-AppxPackage | |
taskkill /f /fi "IMAGENAME eq OneDrive.exe" | |
if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") { | |
& "$env:systemroot\System32\OneDriveSetup.exe" /uninstall | |
} | |
if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") { | |
& "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall | |
} | |
Get-AppxPackage Microsoft.Office.OneNote | Remove-AppxPackage | |
Get-AppxPackage Microsoft.People | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsPhone | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage | |
Get-AppxPackage *Plex* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage | |
Get-AppxPackage *Solitaire* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.MicrosoftStickyNotes | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Office.Sway | Remove-AppxPackage | |
Get-AppxPackage *Twitter* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage | |
Get-AppxPackage Microsoft.XboxIdentityProvider | Remove-AppxPackage | |
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage | |
Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage | |
} catch { } | |
#--- Customization --- | |
Disable-InternetExplorerESC | |
Disable-GameBarTips | |
Disable-BingSearch | |
# 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 | |
#--- Microsoft DevBox Setup Scripts --- | |
# https://github.com/Microsoft/windows-dev-box-setup-scripts/blob/master/scripts/SystemConfiguration.ps1 | |
#--- Enable developer mode on the system --- | |
Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -Value 1 | |
# https://github.com/Microsoft/windows-dev-box-setup-scripts/blob/master/scripts/FileExplorerSettings.ps1 | |
#--- Configuring Windows properties --- | |
#--- Windows Features --- | |
# Show hidden files, Show protected OS files, Show file extensions | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
#--- File Explorer Settings --- | |
# will expand explorer to the actual folder you're in | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1 | |
#adds things back in your left pane like recycle bin | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1 | |
#opens PC to This PC, not quick access | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1 | |
#taskbar where window is open for multi-monitor | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2 | |
# https://github.com/Microsoft/windows-dev-box-setup-scripts/blob/master/scripts/RemoveDefaultApps.ps1 | |
try { | |
iex ((new-object net.webclient).DownloadString("https://github.com/Microsoft/windows-dev-box-setup-scripts/blob/master/scripts/RemoveDefaultApps.ps1")) | |
} catch { } | |
Write-Host "Cleanup Complete." | |
# Resources: | |
# http://boxstarter.org/WinConfig | |
# https://github.com/mwrock/boxstarter/tree/master/Boxstarter.WinConfig | |
# https://chocolatey.org/docs/helpers-reference | |
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment