Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add users from the command line

Status
Not open for further replies.

jmille34

Programmer
Sep 14, 2005
224
US
Is it possible to add domain users via the command line? I have seen reference to a program called dsadd.exe, but I don't seem to have it. I installed the adminpak.msi from the Windows installation cd, but it's not there either. I'd be willing to use 3rd party utilities too. Any advice is greatly appreciated.
 
The DSADD/DSMOD/DSGET/DSQUERY tools were introduced with Windows 2003. I don't believe that they are available in a later service pack or resource kit for 2000. However, IIRC they are built into Windows XP. So if you log into an XP workstation with an account that has permission to create new AD users you should be able to run DSADD from the workstation.

One thing to keep in mind is that you have to have Windows 2000 SP3 or later installed on your Windows 2000 Server in order to use the Windows 2003 admin tools.
 
Chipk is correct, addusers is the best tool for Win2K environments. The DS commands are inherent to Win2K3 only.
 
Ahh, that explains it. Ok, I'll look into the addusers.exe tool. Thanks, all.
 
Chipk is correct, addusers is the best tool for Win2K environments. The DS commands are inherent to Win2K3 only.

But if you have a copy of them (from an XP workstation) and your servers are SP3 or later, you should still be able to use them. There are some things that you can do with DSADD.EXE that you can't do with ADDUSER, not to mention all of the added functionality that you can get with the other DS commands.
 
I'd say the big advantage to dsadd is it allows you to specify group membership upon account creation, which is pretty useful. Other than that, it's just a bunch of extra fields like fax #, dept, etc. If you're looking at just adding basic account info, password and maybe home dir, addusers is much simpler to use. If you want to specify every property possible, go with dsadd as kmcferrin suggests.
 
Can either one create a user account inside a specific OU?
 
You'll have to use DSADD if you want to do that.
 
is there an easy datafile integration to add user? i.e. can i pass an XLS or CSV to it?
 
yes, check "addusers /?", and it will tell you how to do this. It's a comma delimited file with tags to specify accounts/groups. You can do an export on your workstation to see the format:

addusers /d users.txt

will export users on your workstation/server to "users.txt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top