I need to create a number of local accounts on Windows Server 2003. Previously I have created them using the 'Computer Management' gui screen but that method is very tedious and slow.

Is there a command-line method to create a local user (not active directory)?

Ideally the command-line method would create username, password from a CSV file.


Creating a user from the command-line.

net user myUserName /random /add /comment:"9.13.2011" /expires:never /fullname:"My User Name" /passwordchg:no

Adding that user to 'Remote Desktop Users' group:

net localgroup "Remote Desktop Users" myUserName /add

4 Answers 4


To expand on Sergey's comment:

The Net command in NT can provide complete local user and group management. You'll need to work with syntax and your intentions, primarily:

  • net accounts
  • net user
  • net localgroup

Sergey's link is good, but these examples may give you more options.


You can use net user command to create users (local or domain) from command line


There are any number of ways. CSVDE or LDIFDE will import users from a CSV or LDIF file. However, "You cannot import user passwords by using csvde"


I would highly recommend investigating powershell 2 for something like this. It goes one step beyond the command-line... it helps you AUTOMATE tedious command-lines. It has powerful utilities that include quick imports of CSV files, and then performing actions on the objects and data contained within that CSV file.

The following is pseudo-code of how it can act:


where SOME-CREATE-USER-COMMAND is whatever command you want to use to create users. It is called once for each entry in the CSV file. It has access to the data in the CSV file, and can create users, or run any commands for that matter, making use of fields in the CSV file. This is extremely useful for when you have enough entries that manually typing command-lines becomes tedious and error-prone.

And this is coming from a UNIX guy that just learned PS 2 two weeks ago. I gotta' say - PS2 (powershell 2) is pretty sweet. I think you'll like it for automating tasks such as this.

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.