Remove Built-in apps for Windows 10 version 1803

Since the release of Windows 10, it has been common for organization to try and reduce the footprint of built-in apps (or default apps) in their reference images, or even during bare-metal deployment. Over the years, the community has provided several solutions on how to accomplish this including myself. During this time, I’ve attempted to keep my script updated after each new release of Windows 10. You’ll find the post about the method I’m using in the script and how to use it when creating a reference image here:

Remove Built-in apps when creating a Windows 10 reference image

Going forward, instead of updating that blog post for each Windows 10 release, I’ve decided to create a new post instead with information on what has changed or been added in the script (if any).

Download script

I’ve made the script available on our GitHub repository along with all the other scripts that we’ve shared, and it’s available on the following URL:

What’s new

Below is a list of changes and additions made to the latest version of the script:

  • In the previous version of this script, the capability to remove Feature On Demand V2 packages could produce an error that many ran into when using the script. I also  encountered issues after the initial release of the script and later found that the Get-WindowsCapability cmdlet in Windows 10 version 1709 and earlier, didn’t expose the same functionality as found with dism.exe. Now with Windows 10 version 1803, the Get-WindowsCapability cmdlet now has -LimitAccess switch that seems to workaround the issue that occurred. This switch simply just tells Windows to skip checking for capabilities from Windows Update and the cmdlet returns what’s installed on the system. So, in the latest version of this script, that switch has been added when the Get-WindowsCapability cmdlet is used. Logic to support older versions that Windows 10 version 1803 has also been added to this new version of the script
  • Media.WindowsMediaPlayer has now been added to the white list for Feature On Demand V2 packages.
  • Microsoft.MicrosoftOfficeHub, Microsoft.MicrosoftStickyNotes, and Microsoft.WindowsAlarms has now been added to the white list for appx packages.
  • A few modifications has been made to the logging part of the script.

Using the script

Reference the previous instructions from the original post mentioned above. I highly encourage you to also implement the solution at the bottom from Johan’s blog about how to turn of the automatic app updates from the Windows Store.

Below is a few screenshot of how I’m using this script to remove the built-in apps along with Johan’s scripts:

Here’s one from when you enable the app updates from Windows Store at the end before creating the WIM file:

Before and after running the script

When using this script, either when creating a reference image or during bare metal deployment here the outcome of what the script in fact removes. Below is a screenshot from a Windows 10 version 1803 system before the script was executed:

And here’s the same system after the script was executed:

As for Feature On Demand V2 packages, the following remains on the same system as above after the script has executed successfully:

Nickolaj Andersen

Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences such as Microsoft Ignite, NIC Conference and IT/Dev Connections including nordic user groups.


  • I am working on updating my Virtual Image, it just got updated to 1809 yesterday. I can’t sysprep it because it keeps finding these AppX apps so it won’t sysprep. I ran the script and it removed many more than I had before, but I noticed even ones that are listed in the script to whitelist are preventing sysprep from working.

    So, I removed everything from the whitelist and it removed more but there are still apps that are left and not removed that are prevening sysprep. I just want them ALL gone. I can’t figure this out.

  • This looks like a great script. How difficult would it be to modify it for running it against a WIM image before the OSD? It looks like you would have to change the Get-AppxProvisionedPackage -Online to read Get-AppxProvisionedPackage -path but there is some logic in there dealing with versions that I’m not sure how to implement.

  • Hi Nikolaj, thanks for the post! Will this work in the In-Place Upgrade task sequence? If so, does it matter where it is? I had it placed at the end of the TS (no Windows updates enabled), it made a log with a “o” return code, but it didn’t appear to have worked until I ran it manually post upgrade. Thanks again for the great resource.

  • Only problem I ran into was Microsoft.Whiteboard package…Must need a small tweak to the script?

  • Hi,
    Can I use it for the older version also ?
    You added under state restore and custom tasks ( Posts windows update )

  • Hey Nickolay, i try ur script with a fresh W10E 1803 machine – created the first account (local admin) and I get several errors when trying to uninstall some provisioned apps, why is this?

    For example:
    Removing AppxPackage: Microsoft.Microsoft3DViewer_2.1803.8022.0_x64__8wekyb3d8bbwe
    Removing AppxProvisioningPackage: Microsoft.Microsoft3DViewer_2.1803.8022.0_neutral_~_8wekyb3d8bbwe
    Removing AppxProvisioningPackage ‘Microsoft.Microsoft3DViewer_2.1803.8022.0_neutral_~_8wekyb3d8bbwe’ failed: access denied

    This happens for People, Wallet, Camera, Microsoft.Xbox.TCUI_1.11.28003.0_neutral_~_8wekyb3d8bbwe

  • Same with me, I put the script on %SCRIPTROOT% -Script folder but I got the same error with both! I am curious what is the real workflow to make those scripts working in TS!?

  • This does not work at all for me. After running it in Powershell ISE as Administrator, and then looking at the log, I find that everything it attempted to remove fails with either “Unspecified error” or “Access is denied”.

  • Matt .. where are youn running the script ? Try to run it in the state restore phase from full OS.

  • Hi , I have an error with script to disable Windows store update
    what are the prerequisites ? Net framwork
    Dism cmlets ?
    Thank’s for your help

  • Ok, I tried the script but it isn’t working. The step before to disable Windows Update (Johan) Store is working but after that I run your script and it gives me an error. This is the step to execute your script;

    Type: Run PowerShell Script
    Package : Windows 10 Scripts
    ScriptName: “.\Invoke-RemoveBuiltinApps.ps1”
    Parameters: *empty*
    PowerShell Execution Policy: ‘bypass’

    This is the error:

    The argument ‘Invoke-RemoveBuiltinApps.ps1’ to the -File parameter does not exist. Provide the path to an existing ‘.ps1’ file as an argument to the -File parameter.
    Failed to run the action: Remove Appx and Metro.
    Unknown error (Error: FFFD0000; Source: Unknown) TSManager 29/06/2018 12:15:31 3032 (0x0BD8)
    Set authenticator in transport TSManager 29/06/2018 12:15:31 3032 (0x0BD8)
    Set a global environment variable _SMSTSLastActionRetCode=-196608 TSManager 29/06/2018 12:15:31 3032 (0x0BD8)
    Set a global environment variable _SMSTSLastActionSucceeded=false TSManager 29/06/2018 12:15:31 3032 (0x0BD8)
    Clear local default environment TSManager 29/06/2018 12:15:31 3032 (0x0BD8)
    Let the parent group (Customizations – WIN10) decides whether to continue execution TSManager 29/06/2018 12:15:31 3032 (0x0BD8)
    The execution of the group (Customizations – WIN10) has failed and the execution has been aborted. An action failed.
    Operation aborted (Error: 80004004; Source: Windows) TSManager 29/06/2018 12:15:31 3032 (0x0BD8)
    Failed to run the last action: Remove Appx and Metro. Execution of task sequence failed.
    Unknown error (Error: FFFD0000; Source: Unknown) TSManager 29/06/2018 12:15:31 3032 (0x0BD8)

  • Nicolaj – Your script combined with Johans instruction worked perfectly. Thanks a bunch. The only problem is that cortana is still not removed. Am I missing something with regards to Cortana?

  • Hi there,

    Great script. It works flawless when running from ISE. When I put it into my TS, however, it bombed out stating:
    The term ‘Get-AppxPackage’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. TaskSequencePSHost 6/19/2018 3:29:21 PM 0 (0x0000)
    At \\REDACTED\Deploy10v1803\Scripts\RemoveBuiltinApps.ps1:26 char:17
    + $AppArrayList = Get-AppxPackage -PackageTypeFilter Bundle -AllUsers | …
    + ~~~~~~~~~~~~~~~ TaskSequencePSHost 6/19/2018 3:29:21 PM 0 (0x0000)
    ObjectNotFound: (Get-AppxPackage:String) [], CommandNotFoundException TaskSequencePSHost 6/19/2018 3:29:21 PM 0 (0x0000)
    TSHOST: Script completed with return code 0 TaskSequencePSHost 6/19/2018 3:29:21 PM 0 (0x0000)

    I tried using the “Run Powershell Script” task sequence item as well as “Run Command Line” task sequence item “using powershell.exe -file “%ScriptRoot%\RemoveBuiltinApps.ps1”

  • This script has too not worked for me. Tried nearly everything to remove them but seems maybe it gets installed again or I dont know… πŸ™

  • I want to really try this.. Fed up of finding way to Uninstall built-in apps. I was trying to sysprep a windows 10 1803 VM and one of the built-in app wasn’t allowing me to do that. Let me try your script. Good job

  • Is there any method to block Microsoft push apps that are being downloaded via user after first login in Windows 10 PRO version (not Enterprise), I know that I can’t use GPO or Applocker in Professional version.

  • Hi Nikolaj

    Pfffhhh… well I guess I’m just old and tired but I just hammer a Layoutmodification.xml onto the Defaultuser during deployment. With the modification overlay the users get a clean slade with just what they need..

    Those 220Mb Modern.App junk isn’t more than a few temp- or cache files use…
    powershell -executionpolicy bypass Import-StartLayout -LayoutPath ‘.\StartmenuLayout\2016×86\LayoutModification.xml’ -MountPath c:\ -verbose

    (2016×86 refers to our overlay file with 32bit Office 2016 πŸ™‚

  • It looks like my organization has finally taken to the idea of just leaving all of the apps and using AppLocker to block those that we don’t want. While I liked the idea of removing the apps; when we started using the Windows 10 servicing model in SCCM, every time we got a new feature update, we would get more apps. Believe me when I tell you that life is just easier if you stop fighting the Microsoft model and just go with it.

    • Yeah I agree, but it would be a better world if the build from Microsoft would actually be enterprise worthy from the beginning πŸ™‚


    • This appx (provisioned, installed, changing names between versions, etc.) model is fundamentally flawed. I am struggling with the original M.Nihaus’s script whcih is supposed to be removing apps (1703 in my case) – problem is it does not always work.
      The PS commands simply do not see certain apps – provisioned or installed.

      Btw. (to the author) are you using the same script at the beginning and the end of your TS?

      • Please disregard this – I misread the screenshots:
        Btw. (to the author) are you using the same script at the beginning and the end of your TS?

      • Hi,

        Yeah, it’s a missconfiguration actually. Should have updated that image. I only run it once before any Windows Update steps.



Categories use cookies to ensure that we give you the best experience on our website.