Sysprep fails on Windows 10 20H2

David Zemdegs 1,591 Reputation points
2021-01-21T23:26:34.783+00:00

Greetings,
I am doing my first build and capture for Windows 10 20H2 and that capture step fails with the generic 4005.
The sysprep log says 'failed while deleting repository files under c:\programdata\microsoft\windows\Apprepository.
The setupact logfile has a number of errors referring to 'appx' applications - '0x20 and 0x91 error while deleting file'
Anyone know how to fix this please?
Thanks
David Z

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,954 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
1,015 questions
{count} votes

7 answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 14,716 Reputation points MVP
    2021-01-22T02:15:21.017+00:00

    Hi @DavidZemdegs-6660

    Thank you for posting question!

    Please check on the below url's it will help.

    How to get around Sysprep errors in Windows 10 after a major version upgrade

    Sysprep fails after you remove or update Microsoft Store apps that include built-in Windows images

    If a post helps to resolve your issue, please click the Accept the answer and Click Answered Vote as helpful . By marking a post as Answered and/or Helpful, you help others find the answer faster.

    0 comments No comments

  2. David Zemdegs 1,591 Reputation points
    2021-01-22T02:20:50.79+00:00

    Thanks - Ill go through that when I get some time.
    The scenarios they mentioned dont cover mine from what I can see.
    I did an OSD loading the vanilla version of 20H2 and installing only Office. I then applied all the updates and then attempted the capture.


  3. Simon Ren-MSFT 36,931 Reputation points Microsoft Vendor
    2021-01-22T09:25:45.277+00:00

    Hi,

    Thanks for posting in Microsoft MECM Q&A forum.

    May we know what version of ConfigMgr and Windows ADK you are using? If you are running a older version, please upgrade to ConfigMgr 2006/ConfigMgr 2010 and Windows 10 ADK version 2004 to support Windows 10 20H2 as a client.

    Here are some articles for your reference:
    Deploy Windows 10 20H2 task sequence using SCCM
    Build and Capture Windows 10 20H2 Reference Image
    Please note: The links are not from Microsoft, just for your reference. Thanks for your time.

    Best regards,
    Simon


    If the response 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.


  4. Jörgen Nilsson 186 Reputation points
    2021-01-26T22:53:14.68+00:00

    Hi, Another tip..
    I would start with

    1. removing Office
    2. make sure that the builtin-apps doesn't update sounds like that could be the issue, While you install Office apps starts to update.
      Easiest is doing a capture on a VM without internet connection or stop the apps from updating..

    Then when/if that works add back Office and test again.
    fixing-why-sysprep-fails-in-windows-10-due-to-windows-store-updates

    0 comments No comments

  5. SignedAdam 46 Reputation points
    2021-01-27T09:46:24.68+00:00

    Please go to my sysprep guide here
    Under

    “known problems that can happen :“

    You’ll find a remove command

    “remove-appxpackage whateverthenameisoftheapp”

    Take another look in setupact file and copy the name of the appx and replace whateverthenameisoftheapp with the name, paste the whole thing in power shell after removing try again. if sysprep fails again look in that setupact file again and copy the name of the offending app again, repeat the steps till it works... please leave a comment on my guide if it works and mark this question as solved

    If the above doesn’t work I’m out of ideas, you’ll have to start over, let this be a lesson not to use internet on a device you have in Audit Mode!

    Good luck

    0 comments No comments

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.