General discussion


automating user creation

By k4k ·
on win2k Server at times i have to create about 50 to 100 users. i want to automate this process using some command line tools from resource kit.

I'd appreciate if u guys have any step-by-step guidelines to automate the process of creating users.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

automating user creation

by tressdetector In reply to automating user creation

I found the script may help you. If you want to find out more about it, join the community on the news server. To provide feedback or report bugs in sample scripts or the Scripting Guide, please contact Microsoft TechNet.

Creating 1,000 User Accounts
Demonstration script that creates 1,000 user accounts (named UserNo1, UserNo2, UserNo3, etc.) in the Users container in Active Directory. The script is useful for test scenarios that require multiple user accounts.

Script Code

Set objRootDSE = GetObject("LDAP://rootDSE")
Set objContainer = GetObject("LDAP://cn=Users," & _
For i = 1 To 1000
Set objLeaf = objContainer.Create("User", "cn=UserNo" & i)
objLeaf.Put "sAMAccountName", "UserNo" & i
WScript.Echo "1000 Users created."

Related Discussions

Related Forums