Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
December 13, 2007
A. Yes there is. The script below creates a new user (“Bob Bobbington”) through an LDAP connection and adds the user to the “Users” container.
Set objOU = GetObject("LDAP://CN=Users,DC=savilltech,DC=net")
Set objUser = objOU.Create("User", "cn=Bob Bobbington")
objUser.Put "sAMAccountName", "Bob"
objUser.Put "displayName", "Bob Bobbington"
objUser.Put "name", "Bob Bobbington"
objUser.Put "givenName", "Bob"
objUser.Put "sn", "Bob"
objUser.Put "department", "IT"
objUser.Put "mail", "[email protected]"
objUser.SetInfo
objUser.AccountDisabled = false
objUser.put "userPassword", "Pa55word"
objUser.SetInfo
You May Also Like