How to run sysprep without creating admin account?

Hany Mohamed Barbis 0 Reputation points
2025-10-24T07:32:50.5166667+00:00

Hi,

I’m using Windows 11 25H2 Pro and Enterprise, and I need to create Golden Images using Sysprep. However, after running Sysprep, it automatically creates a new administrator account.

How can I prevent this?

My goal is to capture the image after Sysprep and shutdown, then deploy it to other devices without creating any new user accounts — I want to keep only the user accounts that were created in the Golden Image.

Thank you,

Windows for business | Windows Client for IT Pros | Devices and deployment | Set up, install, or upgrade
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. HarryPhan-2691 7,850 Reputation points Independent Advisor
    2025-10-24T08:14:30.1833333+00:00

    Hi Hany, to prevent Sysprep from creating a new administrator account, here are a few steps you can follow:

    Ensure an existing local admin account is present before running Sysprep. This account should be created and configured in advance.

    1. Use the CopyProfile setting in your unattend.xml file to preserve user profile settings. Make sure the unattend.xml includes: Xml <CopyProfile>true</CopyProfile> under the specialize pass.
    2. Avoid using OOBE with auto-login or user creation prompts. In your unattend.xml, configure the OOBE section to skip user creation: Xml <OOBE> <HideEULAPage>true</HideEULAPage> <NetworkLocation>Work</NetworkLocation> <ProtectYourPC>3</ProtectYourPC> <SkipUserOOBE>true</SkipUserOOBE> <SkipMachineOOBE>true</SkipMachineOOBE> </OOBE>
    3. Run Sysprep with the correct flags:
      Bash sysprep /generalize /oobe /shutdown /unattend:C:\Windows\System32\Sysprep\unattend.xml These steps should help you capture a clean Golden Image without triggering the creation of a new admin account during deployment. If this helps resolve the issue, feel free to hit “Accept Answer” so others can benefit too 😊.
    0 comments No comments

Your answer

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