Windows 10 – AppX Removal Script Update

      35 Comments on Windows 10 – AppX Removal Script Update

AppX Removal Script Update

Hey welcome to my blog and Happy 2018!  Some of you may remember I did an article last year about AppX apps and how they can break Sysprep.  I explained how I ran into the issue and then I went a little further than that and provided a couple scripts to help remove the AppX packages and to remove provisioning of those apps so they don’t install under other accounts.  Surprisingly it’s one of the more popular articles on here.

During my day job I’m constantly working with images for VDI deployments and I’m finding additional apps to remove and new ways to view and sort through them all.  I wanted to detail those as an addition to my previous article.  I also wanted to talk through how most people end up breaking Sysprep and how to avoid doing so altogether.

How not to break Sysprep

Ok so this is a LOT easier than you may think.  There’s 3 rules to follow and if you follow them you should not have issues with AppX and Sysprep.

  1. DO NOT log on more than one account after installing Windows 10.  The first time you boot up after installing Windows 10 it asks you to create a new account.  I usually call it “temp” or something like that since it’s intentionally temporary.  When building an image you usually don’t want to have the “temp” account as the one you use going forward.  You may have even joined the image to the domain and logged on under multiple accounts or even enabled and logged on as the local administrator.  This is the first and most common mistake.  Once you login to other accounts the AppX apps will be installed under the additional user accounts/profiles and has greater potential to cause Sysprep to fail.  AppX apps are provisioned or downloaded on every account you login to.  You can login to multiple accounts but you have to follow the next 2 rules.
  2. If you do logon under other accounts, run the AppX removal scripts under ALL accounts removing the SAME apps from all accounts.  You must run the AppX Removal scripts on every account you logged into on the image.  You must also ensure that you remove exactly the same AppX apps and do not install any additional AppX apps on any of the logged in accounts.
  3. DO NOT delete accounts or profiles from the image until you’ve run the AppX removal scripts.  If you delete an account/profile that has an AppX app deployed it can effectively get stuck.  You may run into a situation where you cannot remove the AppX app because it’s stuck in the database as deployed to an account that no longer exists.

If you follow the above rules you can easily avoid problems with AppX apps and Sysprep.  You have to remember that if the image is network connected then the Windows Store can download and install Sponsored Apps for every account you login to.  If you remove those apps on one account that doesn’t mean those apps are removed from any other accounts you may have logged into.  This is also true for the base AppX apps that get installed natively like Bing News and others.  If you Remove-Package a native Microsoft AppX app but you have logged into another account then you also have to Remove-Package that app on any other accounts you’ve logged into.

For my testing and validation of the following scripts I built a Windows 10 – 1703 and a Windows 10 – 1709 virtual machine in my vSphere 6.5 lab.  They’re both completely vanilla.  I installed Windows 10, installed VMware Tools, downloaded and applied updates from WindowsUpdate and took a snapshot of each so I could break and unbreak them very quickly.  As mentioned previously, Windows 10 forces you to create a user account on first boot after install so I created a “Temp” account.  The local administrator account is disabled by default.  I left them both network connected and did not join a domain.

Which AppX apps are installed for which accounts?

The first thing we need to do is check which AppX apps we have installed and under what accounts.  You will need to set the Execution Policy in Powershell to allow you to run the script first.  So open an elevated Powershell or an elevated Powershell ISE window and run the following command to allow scripts to run.

Set-ExecutionPolicy Unrestricted

And after you have finished running the removal scripts on all necessary accounts you should set it back using the below command.

Set-ExecutionPolicy Restricted

The script below will output the Get-AppXPackage command to a text file at the root of the C Drive.

#VirtuallyInclined.com 2018
#You may have to manually uninstall some Sponsored Apps from the Start Menu.
#This has been tested on Windows 10 Enterprise 1703 and 1709.

#This script will output the AppX Packages installed and user accounts they're installed to
#Check c:\appx.txt for the list of installed AppX packages.

Import-Module AppX
Import-Module Dism

Get-AppxPackage -AllUser | FL -Property PackageFullName,PackageUserInformation > c:\appx.txt

At the root of the C Drive you should find a text file containing the output which should look something like the below snippet.

PackageFullName        : Microsoft.ZuneMusic_10.18011.12711.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-3142891566-4258392873-1639507908-1001 [User]: Installed}

PackageFullName        : Microsoft.Office.OneNote_17.9001.21281.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-3142891566-4258392873-1639507908-1001 [User]: Installed}

PackageFullName        : Microsoft.StorePurchaseApp_11801.1801.19001.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-3142891566-4258392873-1639507908-1001 [User]: Installed}

PackageFullName        : Microsoft.Messaging_3.37.23004.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-3142891566-4258392873-1639507908-1001 [User]: Installed}

PackageFullName        : Microsoft.WindowsStore_11801.1001.4.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-3142891566-4258392873-1639507908-1001 [User]: Installed}

You’ll notice this one lists only one “User” account because in this case that’s all I’ve logged in with.  If you’ve logged into the image with more than one account this script output should list multiple users for AppX apps that get deployed per user.  This will help you identify which AppX apps need to be removed because they will cause issues with Sysprep.  I want to qualify that with the following.  There are only certain apps that can be removed without causing issues so please proceed with caution.  Luckily for you I’ve already generated several simple scripts based on what apps can safely be removed.

AppX Removal Script #1 – The Long Version

Noting my previous AppX article, this script is a variation on those scripts that I’ve refined quite a bit.  I came to the realization after writing that article that for a majority of the scenarios I could think of most people would want to remove the particular Installed AppX package as well as remove provisioning so the apps don’t install themselves under new accounts.  So knowing that I condensed both scripts into one and cleaned them up to explicitly remove only what is necessary.  I set only what I typically remove in my own VDI deployments to be removed.  I added some commented out commands if people feel the need to remove Calculator they can.  Although I don’t recommend it of course.  Who doesn’t use Calculator every now and then?

Anyway, I’m assuming here you’ve already set the Execution Policy on your image to Unrestricted.  The following has been tested on Windows 10 – 1703 and Windows 10 -1709.

#VirtuallyInclined.com 2018
#You may have to manually uninstall some Sponsored Apps from the Start Menu.
#This has been tested on Windows 10 Enterprise 1703 and 1709.

#This is the long version of this script with each command explicitly defined.

Import-Module AppX
Import-Module Dism

#Use "#" to comment out apps you don't want to remove.
#You must comment out both commands for each app.  
#The Remove-AppXpackage and Remove-AppXProvisionedPackage must both be commented out.

#Remove AppX Packages for unnecessary Windows 10 AppX Apps
Get-AppxPackage *Microsoft.BingNews* | Remove-AppxPackage
Get-AppxPackage *Microsoft.DesktopAppInstaller* | Remove-AppxPackage
Get-AppxPackage *Microsoft.GetHelp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Microsoft3DViewer* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage
Get-AppxPackage *Microsoft.NetworkSpeedTest* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.Sway* | Remove-AppxPackage
Get-AppxPackage *Microsoft.OneConnect* | Remove-AppxPackage
Get-AppxPackage *Microsoft.People* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Print3D* | Remove-AppxPackage
Get-AppxPackage *Microsoft.RemoteDesktop* | Remove-AppxPackage
Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.StorePurchaseApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsAlarms* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsCamera* | Remove-AppxPackage
Get-AppxPackage *microsoft.windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsMaps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsSoundRecorder* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Xbox.TCUI* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxGameOverlay* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxIdentityProvider* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxSpeechToTextOverlay* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage

#Remove AppX Packages for Sponsored Windows 10 AppX Apps
Get-AppxPackage *EclipseManager* | Remove-AppxPackage
Get-AppxPackage *ActiproSoftwareLLC* | Remove-AppxPackage
Get-AppxPackage *AdobeSystemsIncorporated.AdobePhotoshopExpress* | Remove-AppxPackage
Get-AppxPackage *Duolingo-LearnLanguagesforFree* | Remove-AppxPackage
Get-AppxPackage *PandoraMediaInc* | Remove-AppxPackage
Get-AppxPackage *CandyCrush* | Remove-AppxPackage
Get-AppxPackage *Wunderlist* | Remove-AppxPackage
Get-AppxPackage *Flipboard* | Remove-AppxPackage
Get-AppxPackage *Twitter* | Remove-AppxPackage
Get-AppxPackage *Facebook* | Remove-AppxPackage
Get-AppxPackage *Spotify* | Remove-AppxPackage

#Optional: Typically not removed but you can if you need to for some reason
#Get-AppxPackage *Microsoft.Advertising.Xaml_10.1712.5.0_x64__8wekyb3d8bbwe* | Remove-AppxPackage
#Get-AppxPackage *Microsoft.Advertising.Xaml_10.1712.5.0_x86__8wekyb3d8bbwe* | Remove-AppxPackage
#Get-AppxPackage *Microsoft.BingWeather* | Remove-AppxPackage
#Get-AppxPackage *Microsoft.MSPaint* | Remove-AppxPackage
#Get-AppxPackage *Microsoft.MicrosoftStickyNotes* | Remove-AppxPackage
#Get-AppxPackage *Microsoft.Windows.Photos* | Remove-AppxPackage
#Get-AppxPackage *Microsoft.WindowsCalculator* | Remove-AppxPackage
#Get-AppxPackage *Microsoft.WindowsStore* | Remove-AppxPackage

#Use "#" to comment out apps you don't want to remove.
#You must comment out both commands for each app.
#The Remove-AppXpackage and Remove-AppXProvisionedPackage must both be commented out.

#Remove AppX Provisioning for unnecessary Windows 10 AppX apps
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.DesktopAppInstaller" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.GetHelp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Getstarted" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Messaging" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Microsoft3DViewer" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftOfficeHub" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Office.OneNote" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.OneConnect" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.People" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Print3D" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.SkypeApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.StorePurchaseApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsAlarms" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsCamera" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "microsoft.windowscommunicationsapps" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsFeedbackHub" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsMaps" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsSoundRecorder" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Xbox.TCUI" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxGameOverlay" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxIdentityProvider" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxSpeechToTextOverlay" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.ZuneMusic" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.ZuneVideo" | Remove-AppxProvisionedPackage -Online

#Sponsored Windows 10 AppX apps don't have corresponding provisioning packages

#Optional: Typically not removed but you can if you need to for some reason
#Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.BingWeather" | Remove-AppxProvisionedPackage -Online
#Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MSPaint" | Remove-AppxProvisionedPackage -Online
#Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftStickyNotes" | Remove-AppxProvisionedPackage -Online
#Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Windows.Photos" | Remove-AppxProvisionedPackage -Online
#Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsCalculator" | Remove-AppxProvisionedPackage -Online
#Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsStore" | Remove-AppxProvisionedPackage -Online

If you’ve followed the rules I detailed above this script should work without issue.  Remember though that any Sponsored Apps will potentially install themselves through the Windows Store.  The only way to stop that is to disable the components that auto-download updates and Sponsored Apps which I will talk about later in this article.

AppX Removal Script #2 – The Shorter Version

Ok so I’ve seen variations on this script all over the internet.  The problem though is they are usually too heavy-handed and basically just remove everything which of course we don’t necessarily want to do.  Here I’ve adjusted the script according to my curated list of safe to remove AppX apps and included the Sponsored Apps most commonly installed.

Again, I’m assuming here you’ve already set the Execution Policy on your image to Unrestricted.  The following has been tested on Windows 10 – 1703 and Windows 10 -1709.

#VirtuallyInclined.com 2018
#You may have to manually uninstall some Sponsored Apps from the Start Menu.
#This has been tested on Windows 10 Enterprise 1709 and 1703.

#This is the short version of this script with a variable including all the apps and a loop that runs
#Remove-AppXPackage and Remove-AppXProvisionedPackage on each app called by the variable.
#This unnecessarily runs against some apps that don't have corresponding provisioning packages
#due to the loop.

Import-Module AppX
Import-Module Dism
 

#Use "#" to comment out apps you don't want to remove in the AppXApps variable

$AppXApps = @(

    #Unnecessary Windows 10 AppX Apps
    "*Microsoft.BingNews*"
    "*Microsoft.DesktopAppInstaller*"
    "*Microsoft.GetHelp*"
    "*Microsoft.Getstarted*"
    "*Microsoft.Messaging*"
    "*Microsoft.Microsoft3DViewer*"
    "*Microsoft.MicrosoftOfficeHub*"
    "*Microsoft.MicrosoftSolitaireCollection*"
    "*Microsoft.NetworkSpeedTest*"
    "*Microsoft.Office.OneNote*"
    "*Microsoft.Office.Sway*"
    "*Microsoft.OneConnect*"
    "*Microsoft.People*"
    "*Microsoft.Print3D*"
    "*Microsoft.RemoteDesktop*"
    "*Microsoft.SkypeApp*"
    "*Microsoft.StorePurchaseApp*"
    "*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*"

    #Sponsored Windows 10 AppX Apps
    #Add sponsored/featured apps to remove in the "*AppName*" format
    "*EclipseManager*"
    "*ActiproSoftwareLLC*"
    "*AdobeSystemsIncorporated.AdobePhotoshopExpress*"
    "*Duolingo-LearnLanguagesforFree*"
    "*PandoraMediaInc*"
    "*CandyCrush*"
    "*Wunderlist*"
    "*Flipboard*"
    "*Twitter*"
    "*Facebook*"
    "*Spotify*"

    #Optional: Typically not removed but you can if you need to for some reason
    #"*Microsoft.Advertising.Xaml_10.1712.5.0_x64__8wekyb3d8bbwe*"
    #"*Microsoft.Advertising.Xaml_10.1712.5.0_x86__8wekyb3d8bbwe*"
    #"*Microsoft.BingWeather*"
    #"*Microsoft.MSPaint*"
    #"*Microsoft.MicrosoftStickyNotes*"
    #"*Microsoft.Windows.Photos*"
    #"*Microsoft.WindowsCalculator*"
    #"*Microsoft.WindowsStore*"
    )
foreach ($App in $AppXApps) {
    Get-AppxPackage -Name $App | Remove-AppxPackage
    Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $App | Remove-AppxProvisionedPackage -Online
    }

This script and the first don’t do anything functionally different.  They both remove the same AppX Packages and remove the same AppX Provisioning packages.  The second script actually runs a few Remove-AppXProvisionedPackage commands that it doesn’t need to against provisioned packages that don’t exist since it’s running a loop against the list.  Both the first and second script work perfectly well and allow for customization.  The third script however is just awesome and works in those situations you need to customize what you remove across different images and don’t want to hassle with changing scripts.

AppX Removal Script #3 – The Out-Gridview Version

I like to give credit where credit is due.  A genius on the Superuser.com QA site answered a question of how to quickly remove AppX apps and suggested the use of the Powershell command Out-Gridview.  I’m just sharing someone else’s brilliant use of Powershell here.  This is also by far my favorite method to remove AppX Packages.

Once again, I’m assuming here you’ve already set the Execution Policy on your image to Unrestricted.  The following has been tested on Windows 10 – 1703 and Windows 10 -1709.

#VirtuallyInclined.com 2018
#You may have to manually uninstall some Sponsored Apps from the Start Menu.
#This has been tested on Windows 10 Enterprise 1703 and 1709.

#This is a different method to individually select the packages that you would like to remove.

Import-Module AppX
Import-Module Dism

Write-Warning "Select AppX Packages to remove..."
Get-AppxPackage | Out-GridView -Title "Select AppX Packages to remove" -PassThru | Remove-AppxPackage

Write-Warning "Select AppX Provisioning Packages to remove..."
Get-AppxProvisionedPackage -Online | Out-GridView -Title "Select AppX Provisioned Packages to remove" -PassThru | Remove-AppxProvisionedPackage -Online

This script opens a GUI based dialog box and you just multi-select what you want to remove and click OK to remove the selected AppX apps.  The first part opens a dialog to remove the installed packages.  The second part removes the provisioning packages ensuring that the AppX apps you choose to remove don’t auto-install under new user accounts.  The beauty of this method is you select exactly what you want to remove without having to adjust any scripts.  It’s also a nice and quick way to see which AppX packages or provisioning packages are installed on each user account or to validate that you’ve actually removed what you want to remove.  You can run this again after you’ve removed AppX apps with it and remove additional apps or verify there’s nothing else to remove and you can just hit Cancel to exit the dialog boxes so you don’t remove anything else.

The only downside with this script is you must have a fairly good understanding of which apps you can and cannot remove.  I won’t go into detail too much on that other than to point you to the other scripts to get a good idea of what I would consider safe to remove.  I’ll also share this blog post that has a pretty decent description of most of the AppX packages as well as further suggestions on AppX apps that are safe to remove.

Conclusion

I’ve detailed how to avoid causing the Sysprep issue as well as given you three ways to remove AppX Packages and AppX provisioning Packages.  But wait a minute!  How do I stop the Windows Store from auto-downloading Sponsored Apps or AppX Package updates?  Well there are 3 possibilities here that I’ll briefly describe.

Disable Windows Store Automatic Updates (Registry)

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore]
AutoDownload=dword:00000002

Disable Microsoft Consumer Experience (Registry)

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CloudContent] 
DisableWindowsConsumerFeatures=dword:00000001

Disable Windows Store InstallService (from an elevated Command Prompt)

net stop InstallService
sc config InstallService start=disabled

Each of these individually may help alleviate issues with AppX and Sysprep but like anything use these with caution.  You will be disabling parts of the Windows Store disallowing certain interaction with the Windows Store.

So there you are.  I’ve given you the tools!  Good luck and I hope this update provides some additional help working through these issues.  Thanks for reading my blog!

35 thoughts on “Windows 10 – AppX Removal Script Update

  1. airhawk

    This is great information. I wish Microsoft would quit tampering so that the sysprep process wouldn’t break. Either that or provide a “switch” or UI that would automate the process to clean up for Sysprep. Great work Shawn!

    Reply
  2. Nizel Adams

    Great Guide! It’s missing Microsoft.BingTranslator which I had to add to the list. Chances are people will have to enable then disable bitlocker as well since while it doesn’t auto encrypt like with Windows 8, the “waiting for activation” state it is in will make sysprep error out.

    I ended up creating an image from scratch using these steps since there’s a bug in 1709 that prevents a deprecated windows feature from uninstalling itself if you upgraded from a previous version and none of the known fixes worked (thanks Micro$oft!)

    Thanks again!

    Reply
    1. Shawn Post author

      Thanks for the comments and thanks for reading! I don’t recall off the top of my head seeing Microsoft.BingTranslator in there but I may have missed it. I know I’ve seen it before so maybe I chose not to remove it for some reason. Anyway thanks again!

      Reply
  3. Dan

    Windows store validation stops sysprep from working even though I tried the step at the bottom to disable it. WindowsStore and CloudContent weren’t in the registry. I also had to do the work around for miracast stopping sysprep. No luck so far

    Reply
  4. Pingback: Sysprep in Windows 10 – How to Remove and Unprovision Built-In Windows 10 Appx Apps — Craig Wall

  5. Chris

    Hey Shawn, I followed your directions but I’m still having the provisioned apps getting reinstalled on new user accounts. I installed Windows 10 in a VM with no internet connectivity, only had one user account created, ran the long version script and then created a new account and connected the VM to the internet and the apps were there. Any suggestions on why this is happening?

    Reply
    1. Shawn Post author

      So the Sponsored Apps will potentially reinstall regardless of removal unless you disable them by using one of the methods I described at the bottom of the article. Can you tell me which apps are popping back in? You may also just be seeing the shortcut but the app isn’t actually installed. I’ve seen that a few times.

      Reply
      1. Chris

        Shawn,
        I may have been too quick to say it didn’t work, looks like after a reboot the provisioned apps are no longer there. Like you said though, the sponsored apps are reappearing. I used your suggestions at the end of the article and the first two worked but I can’t stop the Windows Store InstallService. It doesn’t see it as a legitimate service name. I’m using the Pro version of Windows, and the GPO to disable the store doesn’t seem to work with my version (Only Education and Enterprise versions from what I’ve read). I know I’m being picky but I don’t like the look of these apps in a professional deployment.

        Reply
  6. Mac

    Thank you!!!!! Oh man, thanks for the PS scripts, especially the GUI. Taking back control from the Windows crapware fest, and making it a professional env once again.

    Reply
    1. Shawn Post author

      Thanks for reading! If you like that reference link, check back here soon. I’m working on my own series of articles around building a VDI image for Horizon View.

      Reply
  7. Joseph R

    Hello – I was super excited to use this and finding a better way than manually going through these with PS (as I have in the past).

    My question is, has anyone run into an issue with build 1803? I’ve noted several Provisioned apps display the same or similar error >

    “Remove-AppxProvisionedPackage : Unspecified error
    At C:\PS Provisioned app removal.ps1:16
    char:115
    + … Packages to remove” -PassThru | Remove-AppxProvisionedPackage -Online
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Remove-AppxProvisionedPackage
    ], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RemoveAppxProvisionedPac
    kageCommand”

    From what I’ve gathered is there are AppX packages that is somehow interfering with the Provisioning removal. I don’t know which ones, but if I were to use the cmd >

    “Get-AppxPackage -AllUsers | Remove-AppxPackage”

    Then any of the Provisioning packages can be removed.

    When running the AppX packages to remove thru the Out-GridView, all of the packages I selected to remove are gone. So which Appx package is interfering with the provision removal?
    E.g. > Microsoft.GetHelp package is removed, but the provision package will not remove and you get the error above.

    Even when manually doing this I continue to get the Remove-AppxProvisionedPackage : Unspecified error:
    “Get-AppxPackage *GetHelp* | Remove-AppxPackage”

    Then:
    “Import-Module Appx

    Import-Module Dism

    Remove-AppXProvisionedPackage -Online -PackageName Microsoft.GetHelp_10.1706.10441.0_neutral_~_8wekyb3d8bbwe”

    Hope that makes sense – I haven’t found the answer just yet and hoping someone has found out. My Google-fu is not up to par.

    Reply
    1. Shawn Post author

      I’m in the middle of building an 1803 image now and used my own scripts without issue. I haven’t seen this issue yet. Make sure you check syntax and import the Appx and Dism modules. You also might run the other command “Get-AppxPackage -AllUser | FL -Property PackageFullName,PackageUserInformation > c:\appx.txt” to make sure you don’t have a broken manifest or something. Very strange. Let me know if that helps. Thanks for reading and commenting!

      Reply
      1. Joseph R

        I am taking the approach of picking out one Package/Provision to test this now.

        I used the other command you suggested and it shows “GetHelp” package as “Staged”. Which I understand means that the AppX package was removed from the Admin account I’m logged into(as expected), but the Provision will exist for install on any users logging in the image later. So when removing the Provision for a given PackageFullName this would no longer be present in the output correct?

        Outside of that, nothing stands out on the rest of the list. All Packages I had removed show “Staged” and ones that were left show “Installed” for the account used. Just for sake of mentioning it – only the Admin account is used when creating the image.

        Not sure this would matter, but I didn’t mention this is using an Enterprise version of Win10 1803.

        I’m going to go back and do a fresh install, no configuring (as I’ve done some minor software installs and configure before going through the Package/Provision removal process – albeit this has worked seamlessly since 1511) and see what happens.

        What’s got me is that if I removal all Packages from the current account (Get-AppxPackage -AllUsers | Remove-AppxPackage) the Provision removal works just fine. This makes me suspect some Package is affecting this removal process. Like when Sysprep messes up when a package is still installed for the account used.

        Does that sound right?

        Reply
        1. Joseph R

          Hi Shawn,

          Well I have re-tested this and it does indeed work with no adjustments or config to the image (1803).
          During some part of my config it effected this from working fully. So I’ve changed my procedures to do this right in the being prior to any other configuration changes (to be safe).
          The only thing I noted was that the Bing Weather (which we keep for users) didn’t want to play nicely during sysprep and I had to remove it. May need to go through once more to see if something I selected in the PS scripting effected it.

          Thanks for having the blog/scripts and appreciate the help.

          Reply
          1. Shawn Post author

            Sometimes it comes down to the order you do things in. I’m actually working on a series of articles detailing the proper steps to build an image based on Windows 10 (1803) and it demonstrates the order I do things. Maybe it will help. Stayed tuned and thanks again for reading!

  8. Jay

    Hi,

    This is doing my head in. First, thanks to those who have gone before us.

    I’m trying to SysPrep an image using the pre-installed OS on various Lenovo products. The latest two to fail are a T480 and an E580. Wiping them clean and installing the ‘clean’ Win10 1803 image we have on our WDS doesn’t seem to change the fact that they’re failing. I have a bit more trial and error to go through, but the latest testing on both models mentioned suggests that even with the scripts run, that they fail. I did however, upgrade the drivers via Lenovo tools and noticed that Windows moved up automagically from 1709 (the image on both machines) to 1803.

    I only have the one user other than the native Win10 ones – named User. It’s reporting that it’s failing on Dolby right now, but it seems to fail on any number of the apps.

    Some guidance would be appreciated because we deploy large numbers of product here and I’m *the* guy who owns this process and am sick of it breaking! Here’s my logs:

    PackageFullName : Windows.PrintDialog_6.2.0.0_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Framework.1.3_1.3.24201.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Framework.1.3_1.3.24201.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.MPEG2VideoExtension_1.0.6.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.NET.Native.Framework.1.6_1.6.24903.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Framework.1.6_1.6.24903.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Runtime.1.3_1.3.23901.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Runtime.1.3_1.3.23901.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Runtime.1.6_1.6.24903.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Runtime.1.6_1.6.24903.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.Services.Store.Engagement_10.0.17112.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.Services.Store.Engagement_10.0.17112.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Advertising.Xaml_10.1807.9.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.Advertising.Xaml_10.1807.9.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.VCLibs.140.00_14.0.26706.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.VCLibs.140.00_14.0.26706.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : DolbyLaboratories.DolbyAccess_2.3.301.0_x64__rz1tebttyb220
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : 7EE7776C.LinkedInforWindows_2.1.7098.0_neutral__w1wdnht996qgy
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.Wallet_2.2.18065.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.WindowsStore_11807.1001.13.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.VCLibs.140.00.UWPDesktop_14.0.25426.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.VCLibs.140.00.UWPDesktop_14.0.25426.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.HEVCVideoExtension_1.0.11132.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : E046963F.LenovoCompanion_4.13.153.0_x86__k1h2ywk1493x8
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.MSPaint_5.1808.8017.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.Windows.Photos_2018.18061.17410.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.MicrosoftStickyNotes_2.1.18.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed, S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : 1527c705-839a-4832-9118-54d4Bd6a0c89_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : c5e2524a-ea46-4f67-841f-6a9465d9d515_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : E2A4F912-2574-4A75-9BB0-0D023378592B_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : InputApp_1000.17134.1.0_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.AAD.BrokerPlugin_1000.17134.1.0_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.AccountsControl_10.0.17134.1_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.AsyncTextService_10.0.17134.1_neutral__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.BioEnrollment_10.0.17134.1_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.CredDialogHost_10.0.17134.1_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.ECApp_10.0.17134.1_neutral__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.LockApp_10.0.17134.1_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.MicrosoftEdgeDevToolsClient_1000.17134.1.0_neutral_neutral_8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.MicrosoftEdge_42.17134.1.0_neutral__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.PPIProjection_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Win32WebViewHost_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.Apprep.ChxApp_1000.17134.1.0_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.AssignedAccessLockApp_1000.17134.1.0_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.CapturePicker_10.0.17134.1_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.CloudExperienceHost_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.ContentDeliveryManager_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.Cortana_1.10.7.17134_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.HolographicFirstRun_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.OOBENetworkCaptivePortal_10.0.17134.1_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.OOBENetworkConnectionFlow_10.0.17134.1_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.ParentalControls_1000.17134.1.0_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.PeopleExperienceHost_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.PinningConfirmationDialog_1000.17134.1.0_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.SecHealthUI_10.0.17134.1_neutral__cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.SecureAssessmentBrowser_10.0.17134.1_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Windows.ShellExperienceHost_10.0.17134.112_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.XboxGameCallableUI_1000.17134.1.0_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Windows.CBSPreview_10.0.17134.48_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : windows.immersivecontrolpanel_10.0.2.1000_neutral_neutral_cw5n1h2txyewy
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.Advertising.Xaml_10.1705.4.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.Advertising.Xaml_10.1705.4.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.Services.Store.Engagement_10.0.1610.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.Services.Store.Engagement_10.0.1610.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.VCLibs.140.00_14.0.25426.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.VCLibs.140.00_14.0.25426.0_x86__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

    PackageFullName : Microsoft.WindowsCalculator_10.1807.2121.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.XboxGamingOverlay_1.16.1004.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    PackageFullName : Microsoft.WebMediaExtensions_1.0.11904.0_x64__8wekyb3d8bbwe
    PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

    —————————————————————-

    2018-08-23 13:15:22, Error SYSPRP Package DolbyLaboratories.DolbyAccess_2.3.301.0_x64__rz1tebttyb220 was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

    2018-08-23 13:15:22, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.

    2018-08-23 13:15:22, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.

    2018-08-23 13:15:22, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘SysprepGeneralizeValidate’ from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
    2018-08-23 13:15:22, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
    2018-08-23 13:15:22, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
    2018-08-23 13:15:22, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
    2018-08-23 13:15:22, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

    Reply
    1. Shawn Post author

      Hey Jay sorry to hear it’s not going well. I was looking at your list and you should try removing the following from all enabled user accounts and then try Sysprep again.

      PackageFullName : E046963F.LenovoCompanion_4.13.153.0_x86__k1h2ywk1493x8
      PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

      PackageFullName : DolbyLaboratories.DolbyAccess_2.3.301.0_x64__rz1tebttyb220
      PackageUserInformation : {S-1-5-21-2577659275-3665555293-1741437591-1001 [User]: Installed}

      PackageFullName : 7EE7776C.LinkedInforWindows_2.1.7098.0_neutral__w1wdnht996qgy
      PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

      I also noticed that there are references to unnamed SIDs which may mean the AppX manifest is referencing a user that no longer exists. The problem that may present is your manifest is corrupt and there may be no way to fix the Sysprep issues. I would use a non-Lenovo disk/usb/iso/dvd to install Windows. I might even suggest getting a clean ISO straight from the Microsoft VLSC, don’t install any Lenovo software except for the drivers you absolutely need and see what happens. I have an article series coming out next week that details my steps for building a Horizon View –
      Windows 10 image but it also could be used as a baseline to potentially avoid issues like this. I hope that helps and thanks for reading!

      Reply
      1. Jay

        Do you mind elaborating a little bit on removing and deprovisioning those particular two apps? There’s so much conflicting info out there.

        I’m definitely looking forward to your next post.

        Reply
        1. Joseph R

          Jay,

          I’m with Shawn on installing a brand new fresh image. Go into Audit mode and temporarily activate the Administrator account (no other accounts should be created). Then removing all the provisions you don’t want just then and there. If you can do this via a VM it is much better and you can take snapshots along the way. Put drivers on your computers after you drop the golden image on it.

          Set up everything else under that Admin profile (as this can be used to CopyProfile in Sysprep). When you Sysprep the Admin account will be disabled again, just don’t forget to create a new admin account in your AnswerFile. This is done under oobeSystem > Windows-shell-setup > FirstLogonCommands and UserAccounts

          Reply
  9. Jay

    Thanks! I’ll play a little as it’s quite slow around here at the moment, but that can change on any given moment.

    Reply
  10. luke young

    the best article out there that is not to technical to understand ! good job man thanks again !

    Reply
  11. Anthony

    Shawn,

    Thanks for the great articles! I’ve happened upon your site and feel like I’ve found Gold! Anyway, quick question. What if you have a golden image that has three of four users that have logged into it, AND some of them are gone from the company and the AD account is deleted? I’m assuming deleting the user profile is NOT GOOD. So how would you address something like this scenario? Am I just screwed on this image? Time to start over?

    Reply
    1. Shawn Post author

      Unfortunately if I were you I’d probably start over. It’s easier and safer than trying to remove that stuff from the manifest database. Thanks for reading and commenting! I appreciate the feedback!

      Reply
  12. Rich Klein

    Hi Shawn I found your blog from Google. I am running Windows 10 and have noticed strange behavior. When I ran the powershell script I had my only user account and then a number of other entries with the short registry name similar to the above. Is there a way to email you to discuss with additional information?

    Thank you
    Rich

    Reply
      1. Rich

        Hi,

        Thanks – i keep seeing references to a ‘staged’ user & dont know if i should be concerned about security issues?

        On a single PC with one user on it – should there be staged items?

        I have this sort of thing on a few different computers – no domains, just windows 10 workgroup type of PC’s.

        PackageFullName : Windows.PrintDialog_6.2.1.0_neutral_neutral_cw5n1h2txyewy
        PackageUserInformation : {S-1-5-21-4233955842-3031236110-1984878049-1001 [rich]: Installed}

        PackageFullName : Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x86__8wekyb3d8bbwe
        PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

        PackageFullName : Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x86__8wekyb3d8bbwe
        PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

        PackageFullName : Microsoft.UI.Xaml.2.0_2.1810.18004.0_x64__8wekyb3d8bbwe
        PackageUserInformation : {S-1-5-21-4233955842-3031236110-1984878049-1001 [rich]: Installed}

        PackageFullName : Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x64__8wekyb3d8bbwe
        PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

        PackageFullName : Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x64__8wekyb3d8bbwe
        PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

        PackageFullName : Microsoft.Wallet_2.4.18324.0_x64__8wekyb3d8bbwe
        PackageUserInformation : {S-1-5-21-4233955842-3031236110-1984878049-1001 [rich]: Installed}

        PackageFullName : 4DF9E0F8.Netflix_6.95.602.0_x64__mcm4njqhnhss8
        PackageUserInformation : {S-1-5-21-4233955842-3031236110-1984878049-1001 [rich]: Installed}

        Are the staged user something to be concerned of in terms of virus, spyware, remote access?

        Thanks,
        Rich

        Reply
        1. Shawn Post author

          That’s actually not referencing a user. That’s just saying the package is staged and ready for deployment. Those are all legit app packages.

          Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.