Sysprep Fails on 20H2

Joe Dry 26 Reputation points
2021-01-16T16:34:45.267+00:00

Bit of help on Sysprep needed. I'm trying to capture a master image from Hyper-V (Windows 10 Pro 20H2) and I'm having issues to do with the windows store apps.

I have run:
Get-AppxPackage -AllUsers | Remove-AppxPackage
and
Get-AppxProvisionedPackage -online | Remove-AppxProvisionedPackage -online

and I still get this in the logs:2021-01-16 15:47:06, Error SYSPRP Package Microsoft.549981C3F5F10_1.1911.21713.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2021-01-16 15:47:06, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2021-01-16 15:47:06, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2021-01-16 15:47:06, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2021-01-16 15:47:06, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2021-01-16 15:47:06, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2021-01-16 15:47:06, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2021-01-16 15:47:06, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

I cannot uninstall this package individually either, help would be much appreciated.

Joe

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,715 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,948 questions
{count} vote

Accepted answer
  1. Tyler Fleming 101 Reputation points
    2021-02-05T21:56:03.22+00:00

    I am running into this issue as well, where the resolution steps found in this article (https://learn.microsoft.com/en-us/troubleshoot/windows-client/deployment/sysprep-fails-remove-or-update-store-apps) do not solve the issue.

    Edit: Solution (for now), copied from my comment below.

    I have been able to successfully get sysprep to work BUT it required that I never open the start menu. Win + X and Powershell are your friend. The issue is specifically opening the Windows Start menu because that kicks off all the Windows Store/Appx Updates on the machine. You CAN use file explorer and what not. I have a theory that you could probably also use the Cortana Search (by click the Magnifying Glass icon and NOT the start menu) as well; but haven't tested that yet.

    2 people found this answer helpful.

7 additional answers

Sort by: Most helpful
  1. AliceYang-MSFT 2,091 Reputation points
    2021-01-19T09:34:30.787+00:00

    Hi,

    Installing new Microsoft Store apps or updating your existing Microsoft Store apps before generalizing a Windows image will cause Sysprep to fail. Sysprep /generalize requires that all apps are provisioned for all users; however, when you update an app from the Microsoft Store, that app becomes tied to the logged in user account.
    The following error appears in the Sysprep log files (located at %WINDIR%\System32\Sysprep\Panther):
    <package name> was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

    So I think uninstalling Microsoft Store apps or the updates before you run Sysprep is a must. The apps might be updated automatically or new apps were installed on the PC.

    After you uninstall the apps or the updates, if the issue persists, please let us know and we will continue to help you with the issue.

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Jitesh Kumar 1 Reputation point MVP
    2021-01-17T15:20:35.267+00:00

    Hello, It generally occurs when the Store Apps (Appx package) is installed for a particular user account and is not available for other users.

    How you performing the capture manually or Task Sequence? Make sure to use one account to avoid such issue.

    Explore this guide - https://www.anoopcnair.com/sysprep-capture-windows-10-image-using-dism/


  3. Sean Liming 4,601 Reputation points
    2021-01-17T21:45:56.05+00:00

    If the package/application is not needed, uninstall the package and sysprep should run.


  4. AliceYang-MSFT 2,091 Reputation points
    2021-01-18T08:10:48.237+00:00

    Hi,

    The issue you are facing is a known issue. Please follow the resolution in Sysprep fails after you remove or update Microsoft Store apps that include built-in Windows images to troubleshoot.

    I have run:
    Get-AppxPackage -AllUsers | Remove-AppxPackage
    and
    Get-AppxProvisionedPackage -online | Remove-AppxProvisionedPackage -online

    It seems that you have tried some troubleshooting. Please try the resolution step by step. If the resolution still doesn't work, perhaps you need to uninstall the packages before sysprep is run.

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.