Add or remove local user in SCCM 2012 OSD Task Sequence

Sometimes it is necessary to add of remove a local user to your Windows image (like notebooks which must be used at external locations). You can create an image for SCCM with local users, but then you have another image with a different configuration. I think it’s cool everything can be managed with just one image, so here is a small tip to add an user from the task sequence.

The command net user can be used to add a local user, or delete it:
Add user
net user username password /add

Delete user
net user username /delete

Look at http://support.microsoft.com/kb/251394 for the right parameters.

I want to delete a user account which was created during a manual image built.
net user username /delete

Next thing is to add the command line to the task sequence:
1. Edit the Task Sequence
2. Choose Add, General, Run Command Line
Note:
The user can’t be added as all steps in the Install Operating System group are executed in WinPE.
The creation of the user to the end of the TS, after setting up the SCCM client and after restoring the user data.
ScreenHunter_264 Dec. 10 11.21
3. Type or paste the command in the Command line: box