Windows 10 initially comes pre bundled with a lot of unnecessary applications and games.
The following script will remove, typically non-Enterprise, bundled applications
# Functions
function Write-LogEntry {
param(
[parameter(Mandatory=$true, HelpMessage="Value added to the RemovedApps.log file.")]
[ValidateNotNullOrEmpty()]
[string]$Value,
[parameter(Mandatory=$false, HelpMessage="Name of the log file that the entry will written to.")]
[ValidateNotNullOrEmpty()]
[string]$FileName = "RemovedApps.log"
)
# Determine log file location
$LogFilePath = Join-Path -Path $env:windir -ChildPath "Temp\$($FileName)"
# Add value to log file
try {
Add-Content -Value $Value -LiteralPath $LogFilePath -ErrorAction Stop
}
catch [System.Exception] {
Write-Warning -Message "Unable to append log entry to RemovedApps.log file"
}
}
# Get a list of all apps
Write-LogEntry -Value "Starting built-in AppxPackage and AppxProvisioningPackage removal process"
$AppArrayList = Get-AppxPackage -PackageTypeFilter Bundle -AllUsers | Select-Object -Property Name, PackageFullName | Sort-Object -Property Name
# White list of appx packages to keep installed
$WhiteListedApps = @(
"Microsoft.DesktopAppInstaller",
"Microsoft.SkypeApp",
"Microsoft.StorePurchaseApp",
"Microsoft.WindowsCalculator",
"Microsoft.WindowsCommunicationsApps", # Mail, Calendar etc
"Microsoft.WindowsStore",
"Microsoft.MicrosoftStickyNotes"
)
# Loop through the list of appx packages
foreach ($App in $AppArrayList) {
# If application name not in appx package white list, remove AppxPackage and AppxProvisioningPackage
if (($App.Name -in $WhiteListedApps)) {
Write-LogEntry -Value "Skipping excluded application package: $($App.Name)"
}
else {
# Gather package names
$AppPackageFullName = Get-AppxPackage -Name $App.Name | Select-Object -ExpandProperty PackageFullName
$AppProvisioningPackageName = Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like $App.Name } | Select-Object -ExpandProperty PackageName
# Attempt to remove AppxPackage
if ($AppPackageFullName -ne $null) {
try {
Write-LogEntry -Value "Removing application package: $($App.Name)"
Remove-AppxPackage -Package $AppPackageFullName -ErrorAction Stop | Out-Null
}
catch [System.Exception] {
Write-LogEntry -Value "Removing AppxPackage failed: $($_.Exception.Message)"
}
}
else {
Write-LogEntry -Value "Unable to locate AppxPackage for app: $($App.Name)"
}
# Attempt to remove AppxProvisioningPackage
if ($AppProvisioningPackageName -ne $null) {
try {
Write-LogEntry -Value "Removing application provisioning package: $($AppProvisioningPackageName)"
Remove-AppxProvisionedPackage -PackageName $AppProvisioningPackageName -Online -ErrorAction Stop | Out-Null
}
catch [System.Exception] {
Write-LogEntry -Value "Removing AppxProvisioningPackage failed: $($_.Exception.Message)"
}
}
else {
Write-LogEntry -Value "Unable to locate AppxProvisioningPackage for app: $($App.Name)"
}
}
}
# White list of Features On Demand V2 packages
Write-LogEntry -Value "Starting Features on Demand V2 removal process"
$WhiteListOnDemand = "NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language|Browser.InternetExplorer"
# Get Features On Demand that should be removed
$OnDemandFeatures = Get-WindowsCapability -Online | Where-Object { $_.Name -notmatch $WhiteListOnDemand -and $_.State -like "Installed"} | Select-Object -ExpandProperty Name
foreach ($Feature in $OnDemandFeatures) {
try {
Write-LogEntry -Value "Removing Feature on Demand V2 package: $($Feature)"
Get-WindowsCapability -Online -ErrorAction Stop | Where-Object { $_.Name -like $Feature } | Remove-WindowsCapability -Online -ErrorAction Stop | Out-Null
}
catch [System.Exception] {
Write-LogEntry -Value "Removing Feature on Demand V2 package failed: $($_.Exception.Message)"
}
}
The following script will remove, typically non-Enterprise, bundled applications
Write-Output "Uninstalling default apps"
$apps = @(
# default Windows 10 apps
"Microsoft.3DBuilder"
"Microsoft.Appconnector"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingWeather"
"Microsoft.FreshPaint"
"Microsoft.Getstarted"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftSolitaireCollection"
"Microsoft.Office.OneNote"
"Microsoft.People"
"Microsoft.WindowsAlarms"
"Microsoft.WindowsCamera"
"Microsoft.WindowsMaps"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
"Microsoft.XboxApp"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
"Microsoft.MinecraftUWP"
"Microsoft.MicrosoftPowerBIForWindows"
"Microsoft.NetworkSpeedTest"
# 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 -AllUsers | Remove-AppxPackage -AllUsers
Get-AppXProvisionedPackage -Online |
Where-Object DisplayName -EQ $app |
Remove-AppxProvisionedPackage -Online
}