We are deploying Windows 7 using WDS. We want to remove the local user account which was created during setup. We don't need this account since the machines join a domain and a domain user account is created during OOBE phase.

Documentation of Microsoft-Windows-Shell-Setup | UserAccounts | LocalAccounts states that this option can create local accounts.

Is there a way to specify accounts to be deleted in a unattend.xml?


You want to use Audit Mode when creating your Sysprep image. Audit Mode enables you to customize a Windows installation without prompting to create user accounts and configure your location and time zone.

Reference: http://technet.microsoft.com/en-us/library/cc722413(v=ws.10).aspx


Use a cmd file with net user "user name" /delete

part of Unattend.xml:

            <SynchronousCommand wcm:action="add">
                <Description>Executing lastboot script</Description>
            <SynchronousCommand wcm:action="add">
                <Description>logoff corrent user</Description>
                <CommandLine>shutdown /l /f</CommandLine>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.