Created
September 5, 2019 18:12
-
-
Save aprice/46f331a91b41e668dac7ba70076b5a17 to your computer and use it in GitHub Desktop.
PowerShell script to remove Windows 10 bloatware crap
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
Import-Module AppX | |
Import-Module Dism | |
$AppsList = "Microsoft.Bing" , "Microsoft.BingFinance" , "Microsoft.BingMaps" , "Microsoft.BingNews"` | |
, "Microsoft.BingSports" , "Microsoft.BingTravel" , "Microsoft.BingWeather" , "Microsoft.Camera"` | |
, "microsoft.microsoftskydrive" , "Microsoft.Reader" , "microsoft.windowscommunicationsapps"` | |
, "microsoft.windowsphotos" , "Microsoft.XboxLIVEGames" , "Microsoft.ZuneMusic"` | |
, "Microsoft.ZuneVideo" , "Microsoft.Media.PlayReadyClient", "Microsoft.WindowsMaps"` | |
, "Microsoft.XboxApp", "SpotifyAB.SpotifyMusic", "king.com.CandyCrushFriends"` | |
, "king.com.CandyCrushSaga" | |
ForEach ($App in $AppsList) | |
{ | |
$PackageFullName = (Get-AppxPackage -AllUsers $App).PackageFullName | |
if ($PackageFullName) | |
{ | |
Write-Host "Removing Package: $App" | |
Remove-AppxPackage -AllUsers -package $PackageFullName | |
} | |
else | |
{ | |
Write-Host "Unable to find package: $App" | |
} | |
$PackageFullName = (Get-AppxProvisionedPackage -Online | Where DisplayName -EQ "$App").PackageName | |
if ($PackageFullName) | |
{ | |
Write-Host "Removing Provisioned Package: $App" | |
remove-AppxProvisionedPackage -online -packagename "$PackageFullName" | |
} | |
else | |
{ | |
Write-Host "Unable to find provisioned package: $App" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment