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.
- Use the
CopyProfilesetting in yourunattend.xmlfile to preserve user profile settings. Make sure theunattend.xmlincludes: Xml <CopyProfile>true</CopyProfile> under thespecializepass. - Avoid using OOBE with auto-login or user creation prompts. In your
unattend.xml, configure theOOBEsection to skip user creation: Xml <OOBE> <HideEULAPage>true</HideEULAPage> <NetworkLocation>Work</NetworkLocation> <ProtectYourPC>3</ProtectYourPC> <SkipUserOOBE>true</SkipUserOOBE> <SkipMachineOOBE>true</SkipMachineOOBE> </OOBE> - 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 😊.