Skip to content

Instantly share code, notes, and snippets.

@kirkmawa
Last active June 12, 2018 17:14
Show Gist options
  • Save kirkmawa/dfba1ff5980ab5afe160 to your computer and use it in GitHub Desktop.
Save kirkmawa/dfba1ff5980ab5afe160 to your computer and use it in GitHub Desktop.
Remove default apps from Windows 10
Param(
[switch]$UninstallStore
)
## Updated 2018-06-12 for use with Windows 10 version 1803
$RemApps = @(
"Microsoft.Bing*",
"Microsoft.XboxApp*",
"Microsoft.Zune*",
"Microsoft.Office.OneNote*",
"Microsoft.SkypeApp*",
"Microsoft.Reader*",
"Microsoft.WindowsReadingList*",
"Microsoft.WindowsMaps*",
"microsoft.windowscommunicationsapps*",
"Microsoft.MicrosoftOfficeHub*",
"Microsoft.MicrosoftSolitaireCollection*",
"Microsoft.ConnectivityStore*",
"Microsoft.Messaging*",
"Microsoft.WindowsFeedbackHub*",
"Microsoft.OneConnect*",
"Microsoft.Xbox.TCUI*",
"Microsoft.XboxGameOverlay*",
"Microsoft.XboxIdentityProvider*",
"Microsoft.XboxSpeechToTextOverlay*",
"Microsoft.Wallet*",
"*.Twitter*",
"king.com*",
"*getstarted*",
"Microsoft.People*",
"*phone*",
"*surface*",
"*sway*"
)
If ($UninstallStore -eq $true) {
$RemApps += "Microsoft.WindowsStore*"
$RemApps += "Microsoft.StorePurchaseApp*"
$RemApps += "Microsoft.DesktopAppInstaller*"
$RemApps += "Microsoft.Services.Store.Engagement*"
}
$InstApps = Get-AppxPackage -AllUsers
$InstExpanded = $RemApps | Select-Object @{ Name="ExpandedInst"; Expression={ $InstApps.Name -Like $_ }} | Select-Object -ExpandProperty ExpandedInst -Unique
Get-AppxPackage -AllUsers | Where {$_.Name -in $InstExpanded} | Remove-AppxPackage
$ProvApps = Get-AppxProvisionedPackage -online
$ProvExpanded = $RemApps | Select-Object @{ Name="ExpandedProv"; Expression={ $ProvApps.DisplayName -Like $_ }} | Select-Object -ExpandProperty ExpandedProv -Unique
Get-AppxProvisionedPackage -online | Where {$_.DisplayName -in $ProvExpanded} | Remove-AppxProvisionedPackage -online
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment