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
0 comments
Hide comments