So if someone has a list of 200 names and they want to quickly add ActiveDirectory users and Exchange mailboxes for each one, are there any tools/techniques that can help with that?
Details:
- Exchange 2003
- List of 200 names in Excel/CSV file
- Add an AD user
- Then add an Exchange mailbox
- External contacts needed for each user, with email address
- Enable dual delivery for each mailbox
If you don't want to use VBScript, you can also use dsadd. I have a one line batch file that imports all of my new users every year:
(There might be a better way to display this, but I haven't had coffee yet.)
This take 4 columns from a CSV file: Last Name, First Name, Username, Password
I have tried to get this to create email addresses automatically, but I have had inconsistent results. Usually I have to do as mh suggested and just select all in ADU&C and setup Exchange Mailbox from there. Very simple, and much easier than figuring that part out with DSADD.
DSADD has many other parameters as well. You can basically make it set any user properties that you want. Simple, easy, and fast.
One failure: Username collisions need to be handled manually. We occasionally have students with names like James Smith and Jonathon Smith. If you have a system to prevent collisions ahead of time, perfect. If not, I recommend redirecting the output of the bat file to a text file and just search for "Fail" in the results.
(There is likely a much better way to do this part...)
VBScript and ADSI for creating the user accounts. Use something like this to get started:
From here.
The Microsoft Technet Script Center also has loads of sample scripts for just about anything you might wish to do, and is a great resource.
For mailboxes I wouldn't bother scripting; just create all the users in the same OU, then block-select them (in ADU&C), right click, and do the "Exchange Tasks" thing - much quicker and less prone to error.
VBScript is the way.
Using VBScript and ADSI you can automate most of these tasks.
A couple of links to get you started:
creating a user in AD and alot more
scripting exchange
Have fun!