Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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.


share|improve this answer

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>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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