ImageChecker fails d/t staged state of AppX pkgs, but no staged AppX found

1

Appreciate any input on this - previous image creation on this Workspace has occurred w/o difficulties, but after restoring a Win19 Workspace that was in an 'unhealthy' state, image creation now fails. When running ImageChecker.exe, an error of 'No AppX packages can be in a staged state' is thrown. However, listing these through PowerShell 'Get-AppxPackage -AllUsers' shows none in a staged state. Running all of the powershell commands for this issue in the 'Tips' section of the Workspaces Admin Guide doesn't fix the problem, either, even after reboot (and all of the AppX packages left are System AppX packages.

Wondering if anyone else has encountered this and/or any solutions? I googled a bit, including SysPrep resources, without any luck. Wondering what set of PowerShell cmdlets might allow me to discover exactly which AppX package is causing the problem and I can likely force it to be unloaded with that info.

Thanks!

ME

mechE
asked 3 years ago1583 views
1 Answer
2

So, ended up figuring this out with some effort:

  1. Some Windows features were uninstalled in an effort to streamline the resulting images/bloat, but this caused those AppX packages to be marked as staged instead of installed. They cannot be removed (or not easily, and should not). They did not show up as staged in the cmdlets that are in the AWS tips section for this. In order to reveal these, the following code needs to be executed:

Get-AppxPackage -AllUsers | Format-List -Property PackageFullName,PackageUserInformation

(see this Microsoft article for a full explanation of the problem and how to check: https://docs.microsoft.com/en-US/troubleshoot/windows-client/deployment/sysprep-fails-remove-or-update-store-apps)

  1. Once the packages in question are identified, I did actually try to uninstall them, but due to ownership by the system 'nt authority\system' it is not really possible to do so (or appears so without things getting rather messy). The solution was to simply change the status from Staged to Installed by forcing their install to the user. For instance, to just cycle through the entire AppX list and install any listed packages that are not already in the Installed state:

Get-AppxPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Kudos to this article on how to do so: https://www.howtogeek.com/224798/how-to-uninstall-windows-10s-built-in-apps-and-how-to-reinstall-them/

mechE
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions