PowerShell: Removing UWP apps from Windows 10 1607/1703

If you’re using Microsoft Deployment Toolkit to deploy Windows 10 1607 or the soon to be released 1703 (the Creators Update) for a network/corporate environment, then you might want to remove some of the included UWP apps to help speed up log in, save space, save network/internet bandwidth…etc. You could just deploy Windows 10 LTSB but you might not want to remove all the apps, or you might want the advantages of staying with the Current Branch.

First we need to get a list of all the apps installed, so on a base Windows 10 1607/1703 image, run the following PowerShell command:

Get-AppxProvisionedPackage -online | select Displayname

This will give you a list of all the apps currently installed. You won’t be able to remove all of these – for example you can’t remove the Email and Calendar apps, but you can remove things like Groove, Paint 3D, and Xbox. Personally I don’t remove Sticky Notes, Calculator, the Photos app, and a few other as there aren’t any standard Win32 apps built in to Windows to replace them, but ultimately, it’s up to you.

Below is the script I use to remove the apps. I put it at the end of my build image Task Sequence, just after the Windows Update (Post-Application Install) item. You can specfiicy the apps to remove in the $AppList variable, at the top of the script. This script was not created by me, it’s from  Jörgen Nilsson over at ccmexec.com, here’s the link to the post: http://ccmexec.com/2015/08/removing-built-in-apps-from-windows-10-using-powershell/

I’ve been using this script on Windows 10 1607 for a few weeks now, and have tested it a little on the Windows Insiders Build of the Creators Update – Version 1703 Build 15063.14.

Update 02/05/2017: I’ve been using this script with the “final” ISO of Windows 10 1703 from VLSC and it’s worked perfectly. I updated the “apps to remove” list as there are some new ones included in Windows 10 1703.

$AppsList = "Microsoft.3DBuilder","Microsoft.BingWeather","Microsoft.Getstarted","Microsoft.Messaging","Microsoft.MicrosoftOfficeHub","Microsoft.MicrosoftSolitaireCollection","Microsoft.OneConnect","Microsoft.People","Microsoft.SkypeApp","microsoft.windowscommunicationsapps","Microsoft.FeedbackHub","Microsoft.WindowsMaps","Microsoft.XboxApp","Microsoft.XboxIdendityProvider","Microsoft.ZuneMusic","Microsoft.ZuneVideo"

    ForEach ($App in $AppsList) 
    { 
        $PackageFullName = (Get-AppxPackage $App).PackageFullName
        $ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
        
        If ($PackageFullName) 
        { 
            Write-Verbose "Removing Package: $App"
            remove-AppxPackage -package $PackageFullName 
        } 
        Else 
        { 
            Write-Host "Unable to find package: $App" 
        } 
 
        If ($ProPackageFullName) 
        { 
            Write-Verbose "Removing Provisioned Package: $ProPackageFullName"
            Remove-AppxProvisionedPackage -online -packagename $ProPackageFullName 
        } 
        Else 
        { 
            Write-Verbose "Unable to find provisioned package: $App" 
        }
    }

As always, if you have any questions please leave a comment or tweet me.

-Mike

Follow Mike on Twitter: @Digressive

3 thoughts on “PowerShell: Removing UWP apps from Windows 10 1607/1703

  1. Pingback: Building a Windows 10 1703 (Creators Update) Reference Image with Microsoft Deployment Toolkit | Stick To The Script!

  2. One large problem is the user this is run against has to have administrative rights to their PC. In an enterprise environment like ours, 99% of users are NOT. When you even run this as administrator, it uninstalls under that profile…not the user. From here on we’re pushing 1703 only through OSD in ConfigMgr. But we do have about 50 users that need to be upgraded. Any suggestions? Even Microsoft premier support is stuck on this one

    Like

    • What I do is run the Remove-Apps PS script during image creation in the Task Sequence. Then on deploy I use copy profile in the unattend.xml, so the default profile is free of the apps.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

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