If you want to ensure that Windows 10 doesn’t install built-in apps when a new user logs on, you have to remove all provisioned apps.
Latest posts by Michael Pietroforte (see all)

Installed vs. provisioned apps

Before I describe how you can remove all built-in apps, I have to explain the difference between installed and provisioned apps. This difference only exists for the new touch-optimized apps that Microsoft now calls Windows apps.

You’ve probably noticed that, whenever a user logs on the first time on a Windows 10 computer, Windows starts to install apps for that particular user. These apps are the provisioned apps. Likewise, if the user installs a new app from the Windows Store, this app is only available for that user.

Thus, all apps that a particular user can run are the user’s installed apps. On the other hand, the provisioned apps lurk in the background of the system and only come into play whenever a new user logs on.

If you want to ensure that Windows only installs a certain set of apps or no apps at all when a user logs on for the first time, you have to remove all provisioned apps—that is, you have to unprovision the appx packages.

It doesn’t really help if you just uninstall all apps for the user that runs sysprep. Actually, you also have to uninstall all unprovisioned apps for all users; otherwise, sysprep will fail.

Removing provisioned apps

Before you delete the provisioned apps, you might want to get a list first:

Get-AppXProvisionedPackage -Online | Select PackageName

List all provisioned Windows 10 apps

List all provisioned Windows 10 apps

At an elevated PowerShell prompt, you can remove the apps that you don’t want to have in your reference image with this command:

Remove-AppXProvisionedPackage -Online -PackageName <PackageName>

And, to remove all provisioned apps, you can use this command:

Get-AppXProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online

Unprovision all Windows 10 apps

Unprovision all Windows 10 apps

From now on, if a new user logs on to the machine, the only app that will be installed is Edge.

Note that, unlike in Windows 8, in Windows 10 this command also unprovisions the Windows Store app.

As mentioned in my previous post, where I described the different methods to uninstall Windows apps, another option is to simply deploy an image of Windows 10 Enterprise LTSB (Long Term Servicing Branch) edition, which doesn’t come with provisioned Windows apps. A downside could be that you won’t receive any feature updates until Microsoft releases the next LTSB build.

64 Comments
  1. Hi, Thanks very much for all the detailed information here. Despite trying all the various command shown here and ones recommended in other forums (like the one shown below),

    Get-AppxPackage -AllUsers | where-object {$_.name –notlike “*store*”} | Remove-AppxPackage
    Get-appxprovisionedpackage –online | where-object {$_.packagename –notlike “*store*”} | Remove-AppxProvisionedPackage -online

    which is very powerful and removes all apps (except Windows store), including Provisioned ones) for ALL users, I still cannot get passed the Sysprep process of MDT.

    I have managed to capture an earlier revision of my Gold Image  but whatever I try now I get the same error

    SYSPRP Failed to remove apps for the current user: 0x80073cf2.

    SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.

    When I run the command below

    Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation.

    I can see that there are still a great many applications are still showing as installed but they appear to uninstallable ??

    I have even tried deleting the local accounts associated with the apps but still no joy

    PS C:\windows\system32> Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation
    PackageFullName : Microsoft.MicrosoftEdge_38.14393.0.0_neutral__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-4268636132-2605224068-2860058039-500 [Admin-JG]: Installed, S-1-5-21-1106070979-359232129-1136263860-9524
    [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed, S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1003 [Admin-BKP]: Installed}

    PackageFullName : Microsoft.NET.Native.Runtime.1.3_1.3.23901.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-1106070979-359232129-1136263860-9524 [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed, S-1-5-21-4268636132-2605224068-2860058039-1003 [Admin-BKP]: Installed}

    PackageFullName : Microsoft.NET.Native.Runtime.1.3_1.3.23901.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-1106070979-359232129-1136263860-9524 [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed, S-1-5-21-4268636132-2605224068-2860058039-1003 [Admin-BKP]: Installed}

    PackageFullName : Microsoft.NET.Native.Framework.1.3_1.3.23901.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-1106070979-359232129-1136263860-9524 [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed}

    PackageFullName : Microsoft.NET.Native.Framework.1.3_1.3.23901.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-1106070979-359232129-1136263860-9524 [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed}

    PackageFullName : Microsoft.VCLibs.140.00_14.0.23816.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-1106070979-359232129-1136263860-9524 [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed}

    PackageFullName : Microsoft.VCLibs.140.00_14.0.23816.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-1106070979-359232129-1136263860-9524 [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed}

    PackageFullName : Microsoft.Advertising.Xaml_10.0.1605.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-1106070979-359232129-1136263860-9524 [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed}

    PackageFullName : Microsoft.Advertising.Xaml_10.0.1605.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-1106070979-359232129-1136263860-9524 [S-1-5-21-1106070979-359232129-1136263860-9524]: Installed,
    S-1-5-21-4268636132-2605224068-2860058039-1002 [User-bkp]: Installed}

    • Author

      It appears that one of the apps was installed for a user account before you removed the provisioned apps. This always causes trouble. When you start building a new image, the first thing you have to to do is remove the provisioned apps that you don’t need and then you can continue with your configuration.

      Did you try removing the user account that installed the apps?

  2. Thanks very much Michael, Yes I tried deleting the two manually created accounts (as well as the profiles) but no joy.

    Which entry are you referring to that shows that situation, please ?

  3. Metoo 6 years ago

    Still no answer how to get rid of candy crush, Facebook, twitter and all other crap that gets installed when a NEW user logs in… No they are NOT in provisionedapps. What a mess MS creates for businesses.

  4. Shamster 6 years ago

    Hi Michael,

    I’m getting the infamous : “SYSPRP Package Windows.ContactSupport_10.0.15063.0_neutral_neutral_cw5n1h2txyewy was installed for a user, but not provisioned for all users.”.

    What I did was removing ContactSupport app, but apparently it left installed on one, later deleted account. So, when I list apps with:

    Get-AppxPackage -AllUser | Format-List -Property PackageFullName,PackageUserInformation > c:\list.txt

    I can see that ContactSupport is still listed there next to the SID of non-existent account.
    Is there a way of fixing this and making Sysprep getting through, without a need of preparing the reference image again?

    • Author

      Did you also delete the user profile (Control Panel > System > Advanced system settings > Advanced > User Profiles)?

  5. Shamster 6 years ago

    Yes, I did.

    I also tried to look for registry some entries relating to Windows.ContactSupport with account’s SID – no joy.

  6. Shamster 6 years ago

    I should probably mention that provisioning’s been removed already too (Remove-AppxProvisionedPackage -Online -PackageName Windows.ContactSupport_10.0.15063.0_neutral_neutral_cw5n1h2txyewy) and nothing left in C:\program files\windowsapps

  7. Shamster 6 years ago

    “Sysprep was not able to validate your Windows installation. Review the log file at …setupact.log for details”
    Message quoted above comes from the log file.

    I don’t know where “Get-AppxPackage -AllUser” takes the info from, most likely same place Sysprep takes it from, but doesn’t look like it’s the registry – couldn’t find anything relevant there.

    I’ve tried so many things already, that I started thinking about re-provisioning Windows.ContactSupport app for current profile now. I just don’t know how, since I’ve deleted it already from everywhere, in search for a solution (that’s what everybody tells you to do first).

  8. Author

    Maybe it is not the app that causes the problem. The most common reason why sysprep fails with this error message is because you are trying to sysprep an upgraded system. I had this problem on a Windows 10 machine that I “upgraded” with the Anniversary Update. Maybe you try this.

  9. Shamster 6 years ago

    It’s a clean install from freshly downloaded ISO, so I don’t even have that entry in my registry.

    I found several threads from people having same issue in the internet (including MS forums) – no solution.

    The case is – I removed several apps, thought I’m fine, so created test account, to make sure they do not re-install in freshly created accounts. Deleted test account and then decided to remove one more app (ContactSupport, visible as ‘Get Help’ in Start Menu). I ended up like this.

    I’ve spent sooo much time on tweaking this install (to be reference image for deployments) that last thing I want to do is reinstall and re-applying all tweaks.

     

  10. Shamster 6 years ago

    You’re probably right.

    BTW. I’ve plenty snapshots, but forgot to take one right before this one particular step … stupid, oh stupid me.

  11. Slava 6 years ago

    I tried to completely remove WindowsCalculator using Remove-AppxPackage/Remove-AppXProvisionedPackage. Get-AppxPackage and Get-AppxProvisionedPackage report that there is no this package anymore. However I still see *microsoft-windows-calc* in WinSxS, CALC.EXE-*.pf in Prefetch and calc.exe in System32. It doesn’t run, Windows reports an error, but how to get rid of these files? Can I just delete them? I don’t feel comfortable deleting files from WinSxS and Prefetch.

    • Author

      I wouldn’t manually delete files in the Windows folder. You never know if the file is needed by a fancy process. There are countless of files on a Windows system that you probably will never need. I am afraid we have to live with that.

  12. Slava 6 years ago

    I deleted them and then installed Windows 7 calc along with MUI and WinSxS files and registry entries for it.

  13. James H 6 years ago

    I tried Cory’s script that he left in the comments and it worked to get over half of the apps removed but these remain:

    PackageName
    ———–
    Microsoft.DesktopAppInstaller_1.1.25002.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Microsoft3DViewer_1.1702.21039.0_neutral_~_8wekyb3d8bbwe
    Microsoft.MicrosoftStickyNotes_1.4.101.0_neutral_~_8wekyb3d8bbwe
    Microsoft.MSPaint_1.1702.28017.0_neutral_~_8wekyb3d8bbwe
    Microsoft.OneConnect_2.1701.277.0_neutral_~_8wekyb3d8bbwe
    Microsoft.SkypeApp_11.8.204.0_neutral_~_kzf8qxf38zg5c
    Microsoft.StorePurchaseApp_1.0.454.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Wallet_1.0.16328.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Windows.Photos_2016.511.9510.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsAlarms_2017.203.236.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsCalculator_2017.131.1904.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsCamera_2017.125.40.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsFeedbackHub_1.1612.10312.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsSoundRecorder_2017.130.1208.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsStore_11701.1001.874.0_neutral_~_8wekyb3d8bbwe
    Microsoft.XboxGameOverlay_1.15.2003.0_neutral_~_8wekyb3d8bbwe
    Microsoft.XboxIdentityProvider_2016.719.1035.0_neutral_~_8wekyb3d8bbwe
    Microsoft.XboxSpeechToTextOverlay_1.14.2002.0_neutral_~_8wekyb3d8bbwe

    I’d really like to get the Windows Store and Xbox entries out – but these always fail.

    Any other alternatives?

     

  14. Shamster 6 years ago

    Hi James,

    All you need to know regarding the above is covered in Michael’s article above and additionally, these two articles:
    https://www.tenforums.com/tutorials/6664-turn-off-automatic-updates-apps-windows-10-store.html

    https://deploymentparts.wordpress.com/2015/09/10/remove-builtin-apps-from-windows-10-reference-image/

  15. Tim 6 years ago

    I have updated Matthew’s original script for build Windows Pro 10 Build 1703 (as of 7/13/2017 that is the current version.

    Copy and paste this into your PowerShell ISE (ran as Administrator)

    $AppsList = “Microsoft.XboxIdentityProvider”,”Microsoft.Wallet”,”9E2F88E3.Twitter”,”A278AB0D.MarchofEmpires”,”flaregamesGmbH.RoyalRevolt2″,”king.com.CandyCrushSodaSaga”,”Microsoft.OneConnect”,”Microsoft.Microsoft3DViewer”,”Microsoft.WindowsFeedbackHub”,”Microsoft.XboxGameOverlay”,”Microsoft.XboxSpeechToTextOverlay”,”Windows.ContactSupport”,”Microsoft.Office.Onenote”,”Microsoft.BingFinance”,”Microsoft.BingNews”,”Microsoft.BingWeather”,”Microsoft.XboxApp”,”Microsoft.SkypeApp”,”Microsoft.MicrosoftSolitaireCollection”,”Microsoft.BingSports”,”Microsoft.ZuneMusic”,”Microsoft.ZuneVideo”,”Microsoft.Windows.Photos”,”Microsoft.People”,”Microsoft.MicrosoftOfficeHub”,”Microsoft.WindowsMaps”,”microsoft.windowscommunicationsapps”,”Microsoft.Getstarted”,”Microsoft.3DBuilder”

    ForEach ($App in $AppsList)
    {
    $PackageFullName = (Get-AppxPackage $App).PackageFullName
    $ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
    write-host $PackageFullName
    Write-Host $ProPackageFullName
    if ($PackageFullName)
    {
    Write-Host “Removing Package: $App”
    remove-AppxPackage -package $PackageFullName
    }
    else
    {
    Write-Host “Unable to find package: $App”
    }
    if ($ProPackageFullName)
    {
    Write-Host “Removing Provisioned Package: $ProPackageFullName”
    Remove-AppxProvisionedPackage -online -packagename $ProPackageFullName
    }
    else
    {
    Write-Host “Unable to find provisioned package: $App”
    }

    }

  16. sudhakar 6 years ago

    Hi All,

    Do you know I had removed all provisioned packages using remove command, now I want to get them back. Is there a way to get them back?

  17. PaulaJava 6 years ago

    This is the best one yet! I took out all the apps. And so much more simple that most scripts I have come across.

    How do I apply this to a mounted image?

  18. PaulaJava 6 years ago

    This ran perfectly for me. Now how do I get Windows calculator back? It’s the only one I want to keep.

  19. Paula Vivian White 6 years ago

    OK. Is there a way to run this and make calculator an exception?

  20. Jonathan 6 years ago

    Moving between the 1507-1703 branches each Feature upgrade would reinstall the Appx Applications that you previously removed. I have a solution:

    http://www.systemcenterblog.co.uk/2017/11/windows-10-feature-upgrade-without.html

  21. Name 5 years ago

    Hi. Bellow is a bat file.

    REM Removing Provisioned AppX Packages based on exclusion list.
    PowerShell -Command "$ExceptionList =@("*BioEnrollment*",`
    "*CredDialogHost*",`
    "*ECApp*",`
    "*Microsoft.LockApp*",`
    "*MicrosoftEdge*",`
    "*PPIProjection*",`
    "*Apprep.ChxApp*",`
    "*AssignedAccessLockApp*",`
    "*CloudExperienceHost*",`
    "*ContentDeliveryManager*",`
    "*Cortana*",`
    "*HolographicFirstRun*",`
    "*OOBENetworkCaptivePortal*",`
    "*OOBENetworkConnectionFlow*",`
    "*ParentalControls*",`
    "*ShellExperienceHost*",`
    "*immersivecontrolpanel*",`
    "*PrintDialog*",`
    "*MiracastView*",`
    "*WindowsStore*",`
    "*WindowsCalculator*",`
    "*AccountsControl*",`
    "*NET.Native.Framework*",`
    "*NET.Native.Runtime*",`
    "*VCLibs*",`
    "*MSPaint*",`
    "*Apprep*",`
    "*Photos*",`
    "*WindowsCamera*",`
    "*WindowsSoundRecorder*",`
    "*1527c705-839a-4832-9118-54d4Bd6a0c89*",`
    "*c5e2524a-ea46-4f67-841f-6a9465d9d515*",`
    "*E2A4F912-2574-4A75-9BB0-0D023378592B*",`
    "*F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE*",`
    "*InputApp*",`
    "*AAD.BrokerPlugin*",`
    "*MicrosoftStickyNotes*",`
    "*Services.Store*" `
    ) Get-AppXProvisionedPackage -Online | Where { $App = $_; -not ( $ExceptionList | Where-Object { $App -like $_ } ) } | Remove-AppxProvisionedPackage -Online"
    PAUSE

    The output of CMD run as Administrator is:

    D:\>test.bat
    D:\>REM Removing Provisioned AppX Packages based on exclusion list.
    D:\>PowerShell -Command "$ExceptionList =@("*BioEnrollment*",`
    At line:1 char:34
    + $ExceptionList =@(*BioEnrollment*,`
    + ~
    Missing argument in parameter list.
    At line:1 char:37
    + $ExceptionList =@(*BioEnrollment*,`
    + ~
    Incomplete string token.
    At line:1 char:37
    + $ExceptionList =@(*BioEnrollment*,`
    + ~
    Missing closing ')' in subexpression.
     + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
     + FullyQualifiedErrorId : MissingArgument
    D:\>"*CredDialogHost*",`
    '"*CredDialogHost*"' is not recognized as an internal or external command,
    operable program or batch file.
    

    I’ve tried line breaks also with caret and almost the same error.
    I am trying to build a bat that removes both AppX (provisioned and normal) based on Exception List.

     

  22. Amar Honnungar 1 year ago

    1. Navigate to C:\windows\system32\ and search for the Sysprep folder, go to properties and change the ownership of the folder to the local admin by changing the permissions in the Advance menu.
    2.  After you take the ownership of the folder you can open sysprep\actionfiles and edit the Generalize.xml and remove the following entry from there:

    3. Save as  the Generalize.xml on any desired location and then rename the existing Generalize.xml to old and replace it with the new one.
    4. Run sysprep Generalize and see if that works for you.

Leave a reply to Rick Click here to cancel the reply

Please enclose code in pre tags

Your email address will not be published.

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account