From ff7f5f653f922d12758aab6e58719a98b4b2de52 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Sat, 18 Aug 2018 23:35:36 -0700 Subject: [PATCH] Created file called Debloat Windows This is the code in the function called Start-Debloat to debloat Windows 10. --- Individual Scripts/Debloat Windows | 67 ++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Individual Scripts/Debloat Windows diff --git a/Individual Scripts/Debloat Windows b/Individual Scripts/Debloat Windows new file mode 100644 index 0000000..620f599 --- /dev/null +++ b/Individual Scripts/Debloat Windows @@ -0,0 +1,67 @@ +$AppXApps = @( + + #Unnecessary Windows 10 AppX Apps + "*Microsoft.BingNews*" + "*Microsoft.GetHelp*" + "*Microsoft.Getstarted*" + "*Microsoft.Messaging*" + "*Microsoft.Microsoft3DViewer*" + "*Microsoft.MicrosoftOfficeHub*" + "*Microsoft.MicrosoftSolitaireCollection*" + "*Microsoft.NetworkSpeedTest*" + "*Microsoft.Office.Sway*" + "*Microsoft.OneConnect*" + "*Microsoft.People*" + "*Microsoft.Print3D*" + "*Microsoft.SkypeApp*" + "*Microsoft.WindowsAlarms*" + "*Microsoft.WindowsCamera*" + "*microsoft.windowscommunicationsapps*" + "*Microsoft.WindowsFeedbackHub*" + "*Microsoft.WindowsMaps*" + "*Microsoft.WindowsSoundRecorder*" + "*Microsoft.Xbox.TCUI*" + "*Microsoft.XboxApp*" + "*Microsoft.XboxGameOverlay*" + "*Microsoft.XboxIdentityProvider*" + "*Microsoft.XboxSpeechToTextOverlay*" + "*Microsoft.ZuneMusic*" + "*Microsoft.ZuneVideo*" + + #Sponsored Windows 10 AppX Apps + #Add sponsored/featured apps to remove in the "*AppName*" format + "*EclipseManager*" + "*ActiproSoftwareLLC*" + "*AdobeSystemsIncorporated.AdobePhotoshopExpress*" + "*Duolingo-LearnLanguagesforFree*" + "*PandoraMediaInc*" + "*CandyCrush*" + "*Wunderlist*" + "*Flipboard*" + "*Twitter*" + "*Facebook*" + "*Spotify*" + + #Optional: Typically not removed but you can if you need to for some reason + #"*Microsoft.Advertising.Xaml_10.1712.5.0_x64__8wekyb3d8bbwe*" + #"*Microsoft.Advertising.Xaml_10.1712.5.0_x86__8wekyb3d8bbwe*" + #"*Microsoft.BingWeather*" + #"*Microsoft.MSPaint*" + #"*Microsoft.MicrosoftStickyNotes*" + #"*Microsoft.Windows.Photos*" + #"*Microsoft.WindowsCalculator*" + #"*Microsoft.WindowsStore*" + ) + foreach ($App in $AppXApps) { + Write-Verbose -Message ('Removing Package {0}' -f $App) + Get-AppxPackage -Name $App | Remove-AppxPackage -ErrorAction SilentlyContinue + Get-AppxPackage -Name $App -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue + Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $App | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue + } + + #Removes AppxPackages + #Credit to /u/GavinEke for a modified version of my whitelist code + [regex]$WhitelistedApps = 'Microsoft.Paint3D|Microsoft.WindowsCalculator|Microsoft.WindowsStore|Microsoft.Windows.Photos|CanonicalGroupLimited.UbuntuonWindows|Microsoft.XboxGameCallableUI|Microsoft.XboxGamingOverlay|Microsoft.Xbox.TCUI|Microsoft.XboxGamingOverlay|Microsoft.XboxIdentityProvider|Microsoft.MicrosoftStickyNotes|Microsoft.MSPaint*' + Get-AppxPackage -AllUsers | Where-Object {$_.Name -NotMatch $WhitelistedApps} | Remove-AppxPackage + Get-AppxPackage | Where-Object {$_.Name -NotMatch $WhitelistedApps} | Remove-AppxPackage + Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -NotMatch $WhitelistedApps} | Remove-AppxProvisionedPackage -Online