PowerShell: Removing UWP apps from Windows 10 1607/1703/1709

Update 17/10/2017: Updated post with the list of apps included in Windows 10 1709 (Fall Creators Update) by default.

Update 03/08/2017: I’ve re-written much of this post to answer some questions that have come up and to help clarify the process. Thanks to Jörgen Nilsson over at ccmexec.com, with his original post that inspired me to write this one.

When deploying Windows 10 1607/1703/1709 you might want to remove some of the included UWP apps to help speed up the log in process, save storage space, bandwidth etc. There’s a few different ways you can do this. This post will also cover how to remove UWP apps for the current logged on user.

Obtaining a List of UWP Apps

The best way to do this is to build a clean Windows 10 1607/1703/1709 image and then run the following PowerShell command:

Get-AppxProvisionedPackage -Online | Select Displayname

This will display a list of all the apps currently provisioned – apps that will be installed for new users. Personally I don’t remove all of them for my images, but ultimately, it’s up to you and what’s right for your environment.

Here’s a list of the provisioned apps in Windows 10 1709 as of 17/10/2017:

DisplayName
-----------
Microsoft.BingWeather
Microsoft.DesktopAppInstaller
Microsoft.GetHelp
Microsoft.Getstarted
Microsoft.Messaging
Microsoft.Microsoft3DViewer
Microsoft.MicrosoftOfficeHub
Microsoft.MicrosoftSolitaireCollection
Microsoft.MicrosoftStickyNotes
Microsoft.MSPaint
Microsoft.Office.OneNote
Microsoft.OneConnect
Microsoft.People
Microsoft.Print3D
Microsoft.SkypeApp
Microsoft.StorePurchaseApp
Microsoft.Wallet
Microsoft.Windows.Photos
Microsoft.WindowsAlarms
Microsoft.WindowsCalculator
Microsoft.WindowsCamera
microsoft.windowscommunicationsapps
Microsoft.WindowsFeedbackHub
Microsoft.WindowsMaps
Microsoft.WindowsSoundRecorder
Microsoft.WindowsStore
Microsoft.Xbox.TCUI
Microsoft.XboxApp
Microsoft.XboxGameOverlay
Microsoft.XboxIdentityProvider
Microsoft.XboxSpeechToTextOverlay
Microsoft.ZuneMusic
Microsoft.ZuneVideo

Here’s a list of the provisioned apps in Windows 10 1703 as of 03/08/2017:

DisplayName
-----------
Microsoft.3DBuilder
Microsoft.BingWeather
Microsoft.DesktopAppInstaller
Microsoft.Getstarted
Microsoft.Messaging
Microsoft.Microsoft3DViewer
Microsoft.MicrosoftOfficeHub
Microsoft.MicrosoftSolitaireCollection
Microsoft.MicrosoftStickyNotes
Microsoft.MSPaint
Microsoft.Office.OneNote
Microsoft.OneConnect
Microsoft.People
Microsoft.SkypeApp
Microsoft.StorePurchaseApp
Microsoft.Wallet
Microsoft.Windows.Photos
Microsoft.WindowsAlarms
Microsoft.WindowsCalculator
Microsoft.WindowsCamera
microsoft.windowscommunicationsapps
Microsoft.WindowsFeedbackHub
Microsoft.WindowsMaps
Microsoft.WindowsSoundRecorder
Microsoft.WindowsStore
Microsoft.XboxApp
Microsoft.XboxGameOverlay
Microsoft.XboxIdentityProvider
Microsoft.XboxSpeechToTextOverlay
Microsoft.ZuneMusic
Microsoft.ZuneVideo

To get a list of installed UWP apps for the current user, you should use this PowerShell command:

Get-AppxPackage | Select Name

 

Remove UWP Apps from the Current User

The script below will remove the apps specified at the top of the script from the currently logged on user’s profile. It will run without administrative privileges.

## Configure the apps to be removed
$AppsList = "Microsoft.BingWeather",
            "...",
            "Microsoft.ZuneVideo"

##Remove the Apps listed above or report if app not present
ForEach ($App in $AppsList)
{
    $PackageFullName = (Get-AppxPackage $App).PackageFullName

    If ($PackageFullName) {
        Write-Host "Removing Package: $App"
        Remove-AppxPackage -Package $PackageFullName
    }

    Else {
        Write-Host "Unable to find package: $App"
    }
}

## End

 

Remove Provisioned UWP Apps from Windows 10

The script below will remove the specified UWP apps that are provisioned in Windows 10 1703 eg. Groove Music, Photos, Mail and Calendar, etc. Please note that the Start Menu for new users will still have icons for the removed apps and they will need to be removed, either manually by the user or you can customise the Start Menu (as well as the Taskbar) using Group Policy. The script below must be run with administrative privileges.

## Configure the apps to be removed
$AppsList = "Microsoft.BingWeather",
            "...",
            "Microsoft.ZuneVideo"

##Remove the Apps listed above or report if app not present
ForEach ($App in $AppsList)
{
    $ProPackageFullName = (Get-AppxProvisionedPackage -Online | Where {$_.Displayname -eq $App}).PackageName

    If ($ProPackageFullName) {
        Write-Host "Removing Provisioned Package: $ProPackageFullName"
        Remove-AppxProvisionedPackage -Online -PackageName $ProPackageFullName
    }

    Else {
        Write-Verbose "Unable To Find Provisioned Package: $App"
    }
}

## End

 

Remove Provisioned UWP Apps from a Windows 10 .wim Image (Offline)

The script below will remove the specified UWP apps that are provisioned in a Windows 10 1703 .wim file. Please note that much like the above script the Start Menu for new users will still have icons for the removed apps and they will need to be removed, either manually by the user or you can customise the Start Menu (as well as the Taskbar) using Group Policy. The script below must be run with administrative privileges.

1709 Fall Creators Update note: There are multiple images included in 1709, so you will need to change the index to reflect the OS you wish to remove the apps from. Here’s a post from Michael Niehaus on the packaging changes and which index number you need to use for which edition of Windows 10.

## Configure the location of your image and a path to mount it
$Wim = "E:\foo\myimage.wim"
$Index = "1"
$MountPath = "E:\foo\offline"

## Configure the apps to be removed
$AppsList = "Microsoft.BingWeather",
            "...",
            "Microsoft.ZuneVideo"

## Mount the Image
Mount-WindowsImage –ImagePath $Wim –Index $Index –Path $MountPath

##Remove the Apps listed above or report if app not present
ForEach ($App in $AppsList)
{ 
    $ProPackageFullName = (Get-AppxProvisionedPackage -Path $MountPath | Where {$_.Displayname -eq $App}).PackageName

    If ($ProPackageFullName) {
        Write-Host "Removing Provisioned Package: $ProPackageFullName"
        Remove-AppxProvisionedPackage -Path $MountPath -PackageName $ProPackageFullName
    }

    Else {
        Write-Host "Unable to find provisioned package: $App"
    }
}

## Dismount the image and save changes
Dismount-WindowsImage –Path $MountPath -Save

## End

 

The Original Script

For my environment, I use the script below as a part of a MDT Task Sequence that creates my reference image. The script below is pretty much the original with some edits by me for Windows 10 1703. It’s from Jörgen Nilsson’s post on his site, ccmexec.com. The script removes the apps specified from the local administrator account (which is what the MDT Task Sequence runs as) and removes the provisioned apps from the image. During the deployment Task Sequence, the StartMenu and Taskbar are customised for the local admin account to remove the icons for apps that are no longer installed, and I also use the CopyProfile option in the unattend.xml to set the local administrator’s profile as the default for all users. This works for a very locked down environment, but for a more open environment once of the scripts above as a log on script might suffice.

$AppsList = "Microsoft.BingWeather",
            "...",
            "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"
    }
}

 

I hope you find this useful. If you’d like to get in touch with me please leave a comment or tweet me.

-Mike

Follow Mike on Twitter: @Digressive

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

  1. 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

    1. 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

      1. Hey Mike, where in the TS do you have this step? I can’t seem to figure out where in the process it should be for it to actually remove the apps. I’m having this issue in both my OS upgrade package and new build. Any help is appreciated!

        Like

      2. Hi Joe,
        I put it right at the end, after Windows Updates (which are provided by a WSUS server). I must say that a few people have given me a lot of feedback saying that it isn’t working for them – so maybe I’m missing something, but I’m in the middle of doing prep work for a large Windows 10 deployment right now and I’m not having any issues – the apps are gone in my images. I will definitely re-visit this once my work is complete and try to figure out what is going on.

        Sorry I can’t be of more help right now, thanks for the comment!

        -Mike

        Like

  2. Hi Mike,

    I’m setting up deploying Win10 v1607 with MDT and wondering where in the TS you could put this?

    Just an added note, I am adding CU KB4025339 in Preinstall area right after Inject drivers. I don’t create any hybrid images and simply use MDT to deploy the vanilla v1607 wim…..just a preference thing at the moment.

    Thanks

    Like

    1. Hi Patrick, I’ve actually just updated this post to explain the process better. In my TS I put the remove-UWP-apps PowerShell script in a Custom Tasks folder after Windows Update (Post-Installation).

      Hope that helps.

      Like

  3. Hi,
    I found out an easy (?) way to clear the broken tiles that are left over after the store apps are removed and you log in as a different new user. Just run the following powershell command:
    Stop-Process -ProcessName explorer -Force
    You have to do this once per every new user that logs into the machine.

    “Luckily” in our situation this is already done by the manage taskbar script, explained here: http://ccmexec.com/2015/12/removing-the-edge-icon-from-the-taskbar-during-osd/
    Part of the script is the commandlet outlined above.

    Like

  4. Hi,
    Can you post the screenshot of the task seqence part of the script .

    The script is running offline or onlin in the task sequence ?

    How about turing consumer experience off in the gpo ?

    Thanks

    Like

    1. Hi there,

      I can post the Task Sequence but I’m currently unable to, will post it soon.

      Here’s my Task Sequence with the remove UWP apps script: UWP Apps Remove script in Task Sequence

      Personally, I run the script online.

      The Consumer Experience GPO setting prevents Candy Crush etc. from being downloaded and installed, but I’ve never had to enable it personally. I’d like to look into it a but more though, thanks!

      -Mike

      Like

  5. I’m curious what apps you are removing and which ones you are keeping. In an enterprise environment, I really don’t care if they can still access Maps or Calculator, or even paint (sometimes they put screen shots in there).

    But all the xbox stuff, candy crush saga, bubble witch saga, no need for alarms or people (they use Outlook for that kind of thing), no reason for windows store, feedback hub, etc…

    Like

    1. Hi there, for me, it depends on the environment. It’s totally up to you which ones you remove and which ones you keep, I’ve just listed all of the built-in apps to be helpful. 🙂 -Mike

      Like

  6. Hey Mike, first of all thanks for the script (and blog content). I would appreciate if you can give me your input on my problem with apps returning when running your script (and other similar scripts based on Remove-Appx & Remove-AppxProvisioned -online). Everything except 3 apps is removed upon startup but within minutes after first logon more apps starts to populate. I have a long technet thread here with screenshots (where one of the guys pointed me to your script):
    https://social.technet.microsoft.com/Forums/en-US/f3acd7f0-4a3e-4269-81f4-f8c6ed1fc633/how-to-actually-remove-unwanted-apps-in-windows-10-1703-?forum=ConfigMgrCBOSD

    On my latest attempts I am both removing apps in my MDT task sequence and SCCM task sequence, same issue. In advance, thank you.

    Like

    1. Hi there, firstly thanks for the kind words! I see what you’re trying to achieve and I’ll try to help as best I can. Some apps like Candy Crush aren’t really installed as part of the OS, but are a stub (if you will), and when the Windows Store update process kicks in and if there’s internet access, it’ll download and install it. During my image builds, this is prevented because there’s no internet access. When deploying Windows 10, I customise the Start Menu and the Candy Crush and other apps tiles are removed, so the apps don’t try to install. There’s a GPO option that may help with this too, although I haven’t tested myself yet. More info here: https://blogs.technet.microsoft.com/mniehaus/2015/11/23/seeing-extra-apps-turn-them-off/

      Hope this helps!
      -Mike

      Like

      1. Hey again Mike, my WIM file is already generated from MDT (with the scripts to remove apps running in MDT task sequence). Then I run the script a second time during OS deployment in SCCM (with the WIM file from MDT).

        Basically what happens is that the computer looks fine upon startup post OSD, but within 10-15 minutes a particular set of apps are installed. Despite these apps already haven been removed with Remove-Appx + Remove-AppxProvisioned -online . In eventlog I see one Event 43/WindowsUpdateClient event per app being re-installed. So the users will get the apps back regardless as soon as computer has Internet access, and I don’t see how image build without Internet access would change that.

        I have ended up restricting _a lot_in Registry now (including stuff on Cloud Content, hence your URL), and so far it looks fine. Although I wish I was able to get clean looking business OS without having to do all these Registry changes. With the current approach MS is taking on apps and dynamic OS changes it’s hard to tell if some registry change will give a future problem.

        Re customizing XML: My issue is, as far as I know I can only customize the tiles out on the right side. As long as an app is installed it will appear on the alphabetical start menu list on left side and there’s no way to hide them. If that was possible it would be a solution I’d be satisfied with.

        The reason why I wan’t as few apps as possible (at least no non-business software) on the left side start menu is because I am deploying Win10 to computer novice users currently using Win7. They have never seen tiles and based on their Win7 experience the first place they will try to locate software is on the left side start menu.

        Like

  7. Mike,

    Spent a portion of today performing an upgrade of 1607 ENT to 1709 ENT – the upgrade itself went fine – but I did have some odd behavior with your “removal” script. Here is my slightly customized version of your script:

    $AppsList = “Microsoft.DesktopAppInstaller”,
    “Microsoft.GetHelp”,
    “Microsoft.Getstarted”,
    “Microsoft.Messaging”,
    “Microsoft.Microsoft3DViewer”,
    “Microsoft.MicrosoftOfficeHub”,
    “Microsoft.MicrosoftSolitaireCollection”,
    “Microsoft.MicrosoftStickyNotes”,
    “Microsoft.MSPaint”,
    “Microsoft.Office.OneNote”,
    “Microsoft.OneConnect”,
    “Microsoft.People”,
    “Microsoft.Print3D”,
    “Microsoft.SkypeApp”,
    “Microsoft.Wallet”,
    “Microsoft.WindowsAlarms”,
    “Microsoft.WindowsCamera”,
    “microsoft.windowscommunicationsapps”,
    “Microsoft.WindowsFeedbackHub”,
    “Microsoft.WindowsMaps”,
    “Microsoft.WindowsSoundRecorder”
    “Microsoft.Xbox.TCUI”,
    “Microsoft.XboxApp”,
    “Microsoft.XboxGameOverlay”,
    “Microsoft.XboxIdentityProvider”,
    “Microsoft.XboxSpeechToTextOverlay”,
    “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”
    }
    }

    I inserted this to run as a PS entry (RemoveUWPApps.ps1) directly after the Windows Update (Post-Application Installation) node in my “upgrade” task sequence.

    When I ran the TS – the upgrade was applied but went I logged into Windows – several apps like Groove Music (aka ZuneMusic), the entire XBox group and ZuneVideo (aka Movies and Video?) remained in place.

    I am baffled as to why they were not removed as they are all targets to be dumped as part of my script.

    Is the positioning of the script in the wrong spot or am I missing something else?

    Bruce

    Like

    1. Hi Bruce,
      Thanks for the info. I’m not sure why the apps are remaining after the running of the script, the script is in a good position, it’s where I put it during image build TS’s. What I’d suggest is perhaps removing the apps with PowerShell from the WIM file itself and then try the upgrade with that file. It would still be classed as an “original” WIM to MDT I think.

      -Mike

      Like

  8. Mike,

    I have experimented with several of your scripts here – and none of them seem to work correctly on 1709. I just did another 1607->1709 upgrade and then ran the first script “Remove UWP Apps from the Current User” from the Win 10 desktop.

    PS correctly identified a list of apps that were not installed and then took aim at these remaining apps:

    Microsoft.Xbox.TCUI”,
    “Microsoft.XboxApp”,
    “Microsoft.XboxGameOverlay”,
    “Microsoft.XboxIdentityProvider”,
    “Microsoft.XboxSpeechToTextOverlay”,
    “Microsoft.ZuneMusic”,
    “Microsoft.ZuneVideo”

    The script echoed back that it was in fact “removing” these – but even after a reboot – the apps are still on the start menu and they are not just icons – I can click an icon and the apps starts up.

    I wonder what is going on?

    B

    Like

  9. Hi Mike,
    Thanks a lot for your script and your continuous response to each and every comment.
    Keep Going your Good Work !!!

    I have a Query, I have created a MDT image of 1709. But as someone said above, apps removed from Admin ID exists on other user profiles. its not getting removed for all users.

    Please give me a hint to remove apps from all users .

    Also I have some placeholder tiles on start layout, how to remove this automatically?

    Enjoy your vacation.
    Awaiting your update.

    Like

    1. Hi Raja,
      Firstly, thanks for the kind words! On to your queries: At the bottom of the post is the original script which I still use in my Task Sequence. The script removes the apps for the current user, which in my case is the local administrator, and also all future users. I run this script as part of my build Task Sequence. I deploy images with a separate TS.

      As for the icons on the start menu, I customise my Start Menu layout which has all those apps removed. I wrote about how to do that here: https://gal.vin/2017/03/30/w10-1607-start-menu-customisation-update/

      Hope this helps.
      -Mike

      Like

      1. Mike

        I tested your script with 1709 on a bunch of different task sequences – and it does not remove apps cleanly for all users. It does clear them for Admin during the TS – but there are a number of threads on how “copyprofile” is now somehow deprecated (or certainly hit or miss) in 1709 and as such does not remove the apps for a different user.

        I install 3 additional user accounts during my standard task sequence and if – after running your script – I log on as any of these users – even with CopyProfile in the unattend.xml file – the apps are still there.

        So I took it to an extreme level and now do a hard remove on the actual source files using NT Lite. This proves to be perfect as I can clean out everything before ever starting the TS.

        Cheers,

        Bruce

        Like

      2. Hi Bruce,
        Mmmm, I’ve had no trouble doing it this way myself recently, and I’m currently using devices with 1709 deployed in my usual way using the script and copy profile, but it’s also possible I’m missing something. As of this week, I’ve moved onto a new project at a much larger organisation. I will be dealing with Windows 10 deployment in the future and I’ll post about any findings and improvements as I come across them. I’ve no time frame for this at the moment though as I’m currently re-building the team and infrastructure. Thanks for all of your comments, they’ve been useful, but sadly I’m not in a position to spend time looking into these issues like I once was. Or at least for the time being.
        -Mike

        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