I've found a script or two through the news groups (here and on the
WSH group) that allows me to create a couple of thousand users. Now
what I'm trying to figure out is how to get those users to "shuffle"
themselves into one of thirty OU's under the users.
DOM
|_OU1
| |
| |_users
| |_bob
| |_doug
|_OU2
|
|_users
|_bob2
|_doug2
and so on...up to thirty OU's with the 90000 users being placed (or
like cards, "dealt") into one of the thirty groups randomly. What I'm
trying to do is break the AD database, incidentally by seeing how many
"bob's" I can cram into the database.
Here's the script that I've been tinkering with from one of the folks
on the newsgroups.
===================================
For i = 1 To 90000
Set objDomain = GetObject("LDAP://dc=bob,dc=com")
Set objOU = objDomain.Create("organizationalUnit", "ou=OU0" & i)
objOU.SetInfo
Set objUser = objOU.Create("User", "cn=bobby0" & i)
objUser.Put "sAMAccountName", "bobby0" & i
objUser.SetInfo
objUser.AccountDisabled = FALSE
objUser.SetPassword "password"
objUser.Put "pwdLastSet", -1
objUser.AccountExpirationDate = "01/01/2050"
objUser.Put "givenName", "Bobby"
objUser.Put "initials", "B"
objUser.Put "sn", "User"
objUser.Put "displayName", "Bob, Bobby"
objUser.Put "physicalDeliveryOfficeName", "Room 707"
objUser.Put "telephoneNumber", "(320) 762-xxxx"
objUser.Put "mail", "bobby@bobby.com"
objUser.Put "wWWHomePage", "http://www.bob.com"
objUser.SetInfo
Set objUser = objOU.Create("User", "cn=Bob0" & i)
objUser.Put "sAMAccountName", "Bob0" & i
objUser.SetInfo
objUser.AccountDisabled = FALSE
objUser.SetPassword "password"
objUser.Put "pwdLastSet", -1
objUser.AccountExpirationDate = "01/01/2050"
objUser.Put "givenName", "Bob"
objUser.Put "initials", "B"
objUser.Put "sn", "User"
objUser.Put "displayName", "Bob, Bob"
objUser.Put "physicalDeliveryOfficeName", "Room 666"
objUser.Put "telephoneNumber", "(613) 762-xxxx"
objUser.Put "mail", "bob@bob.com"
objUser.Put "wWWHomePage", "http://www.bob.com"
objUser.SetInfo
Next
WScript.Echo "90000 OU's and Users created."