?
Solved

Bulk user creation script

Posted on 2004-03-30
9
Medium Priority
?
554 Views
Last Modified: 2010-04-19
Hi

I have an excel spreadsheet containing a large number of usernames, password, and various other attributes from which I would like to create users in an Active Directory Domain.
I need a script (preferably vbs) which will reference the spreadsheet, looping through the rows and create the users for automatically me.
0
Comment
Question by:toffee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 2

Expert Comment

by:Ugrum
ID: 10712209
You can use utilities such as ldifde and cvsde to automate bulk object creation tasks.
0
 

Author Comment

by:toffee
ID: 10712320
Thanks  I am aware of those but am really after a vbscript using ADSI as I am a bit more familiar with that and hope to use this as the basis of other scripts for the future.
0
 
LVL 2

Expert Comment

by:Ugrum
ID: 10712640
Then take a look at the following link:
http://www.microsoft.com/technet/community/scriptcenter/default.mspx
a LOT of examples there, should be enough to make what you want.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 20

Expert Comment

by:What90
ID: 10712991
I used Active Directory Cookbook. I found this book a great help.

Have a look at some of the demo codes in the users section:
http://www.rallenhome.com/books/adcookbook/code.html
0
 

Author Comment

by:toffee
ID: 10713388
Loads of useful info in there in clear simple scripts which I like.  But what I'm really after is something which will take the usernames/passwords/descriptions from a spreadsheet and create the users in AD.

I suppose I could write some thing in VBA which will create a text file in .ldf format then use LDIFDE to create the users, but I was hoping someone had a script which would do it in the one operation i.e. a vbs accessing excel to get the information and setting up the users as it goes.
0
 
LVL 3

Expert Comment

by:following
ID: 10716006
I used the sample code from this article: http://www.winnetmag.com/Article/ArticleID/19830/19830.html

I modified it to fit my environment, adding/removing AD properties as necessary to fit our users.  There is an error when you press ctrl-d to run the code: click debug and change both references to frmLocalAdminPwd to frmUserCreation.  I added another worksheet into which I pasted all my users, passwords, etc.  I then made the code loop through each cell of the worksheet, instead of taking each user individually.

Hope this helps,
-jdm
0
 
LVL 3

Accepted Solution

by:
following earned 2000 total points
ID: 10777739
Here is another example that may be helpful:

http://cwashington.netreach.net/depo/view.asp?Index=915&ScriptType=vbscript

I have found the scripts from cwashington to be of excellent quality -- I haven't tried this one, but it looks fairly standard to me.

-jdm
0
 

Author Comment

by:toffee
ID: 10781650
Thanks following.

Thats just what I need.
0
 
LVL 3

Expert Comment

by:following
ID: 10782798
Toffee,

I really appreciate the thank you!  It's actually nicer to know that the solution helped than to just gain more points...

-jdm
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question