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.

Michael Pietroforte

Michael Pietroforte is the founder and editor in chief of 4sysops. He has more than 35 years of experience in IT management and system administration.

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:

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:

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

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.

Win the monthly 4sysops member prize for IT pros

4+
Share
63 Comments
  1. John Philipson 3 years ago

    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}

    0

    • Author
      Michael Pietroforte 3 years ago

      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?

      0

  2. John Philipson 3 years ago

    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 ?

    0

  3. Metoo 3 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.

    1+

  4. Shamster 2 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?

    0

    • Author
      Michael Pietroforte 2 years ago

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

      0

  5. Shamster 2 years ago

    Yes, I did.

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

    0

  6. Shamster 2 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

    0

  7. Shamster 2 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).

    0

  8. Author
    Michael Pietroforte 2 years ago

    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.

    0

  9. Shamster 2 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.

     

    0

  10. Shamster 2 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.

    0

  11. Slava 2 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.

    0

    • Author
      Michael Pietroforte 2 years ago

      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.

      0

  12. Slava 2 years ago

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

    0

  13. James H 2 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?

     

    0

  14. Shamster 2 years ago
  15. Tim 2 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"
    }

    }

    0

  16. sudhakar 2 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?

    0

    • Author
      Michael Pietroforte 2 years ago

      As far I know there is no officially supported way to bring back removed provisioned apps.

      0

  17. PaulaJava 2 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?

    0

  18. PaulaJava 2 years ago

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

    0

    • Author
      Michael Pietroforte 2 years ago

      Maybe it worked too well then. As far as I know there is no way to restore an unprovisioned app.

      0

  19. Paula Vivian White 2 years ago

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

    1+

  20. Jonathan 2 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

    0

  21. Name 2 years ago

    Hi. Bellow is a bat file.

    The output of CMD run as Administrator is:

    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.

     

    0

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2019

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