Windows Server 2008

Create Multiple ADAM Users

Check out this post on technet on how to create 100,000 users in an ADAM instance easily via a script. Could come in useful some time 🙂

http://blogs.technet.com/ad/archive/2009/08/14/bulking-up-an-adam-test-instance.aspx

‘**************************************************
‘ This script adds i = n users to a specified OU or CN. 
‘  Alter as needed.
‘**************************************************

‘ If the application NC  DN is "ou=adamou,c=us" and the server is "adamhost" and the port is 389. Then the parameter ‘OUName   should be passed
‘ as follows:  "LDAP://adamhost:389/ou=adamou,c=us"

Set ou = GetObject("LDAP://localhost:389/OU=Users,DC=treyresearch,DC=com")

For i = 1 To 100000

set usr = ou.Create("user", "cn=" & "Test" & i)

usr.Put "displayName", "Test" & i
usr.Put "userPrincipalName", "Test" & i & "@treyresearch.com"

usr.SetInfo

Next

wscript.echo "100000 users created successfully"

Leave a Reply

Your email address will not be published.