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.
Set objRootDSE = GetObject("LDAP://rootDSE")Set objContainer = GetObject("LDAP://cn=Users," & _objRootDSE.Get("defaultNamingContext"))For i = 1 To 1000Set objLeaf = objContainer.Create("User", "cn=UserNo" & i)objLeaf.Put "sAMAccountName", "UserNo" & iobjLeaf.SetInfoNextWScript.Echo "1000 Users created."
This is a VB Script, this can be used by saving the file in .vbs file