crane-accident

Let’s just say you want to remove certain built-in Windows 10 Apps from the system.  Not just hide from the Start menu.  Not disable using Group Policy (good luck what that actually; it’s proving inconsistently ineffective for me).  What can you do?

Remove-AppxPackage.  That’s what.

Keep in mind that this works on most of the built-in apps, but not all of them.  For example, you can’t use it to remove Edge or Cortana. You’ll get an error mentioning something like…

cortanadown

So, here’s one example for ripping them out using a delimited match-list.  The following PowerShell example uses a list defined as a comma-delimited string assigned to variable $xlist.  Fetch the Apps using Get-AppxPackage and roll on.  This will only work if executed under the context of an administrative user.

Warning: Test this on a virtual machine or non-production / non-critical computer before trying it on something else.  No warranty or garantee is provided either implicitly or explicitly for any purpose whatsoever of any kind in any universe within any eon.  Use at your own risk.  Batteries not included. Void where prohibited. Add water, makes it own sauce.


 

$xlist = "WindowsAlarms,WindowsMaps,XboxApp,People,BingFinance,BingWeather,BingNews,BingTravel"
$xlist += ",MicrosoftSolitaireCollection,ZuneMusic,ZuneVideo,WindowsPhone"
$xlist += ",WindowsMail,Getstarted,BingHealthAndFitness,BingFoodAndDrink,WindowsReadingList,SkypeApp"
$xlist += ",windowscommunicationsapps"

$apps = Get-AppxPackage -AllUsers

foreach ($app in $apps) {
    $an = $app.Name
    $fn = $app.PackageFullName
    foreach ($x in $xlist.split(",")) {
      if ($an -like "Microsoft.$x*") {
        Write-Host "Removing: $an..."
        try {
          # yes, this error handler sucks...
          Remove-AppxPackage -Package $fn -ErrorAction Ignore
        }
      }
    }
}
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s