Hi,
I am trying to write a script that should do the following: create a
given number og users with a standard password, their accounts enabled
and the "change password at logon" flag un-checked. This is what I've
got so far
Set objRootDSE = GetObject("LDAP://rootDSE")
Set objContainer = GetObject("LDAP://OU=Application,OU=Testers,OU=Test
Users," & _
objRootDSE.Get("defaultNamingContext"))
For i = 1 To 3
Set objLeaf = objContainer.Create("User", "cn=MT" & 1020 ++ i)
objLeaf.Put "sAMAccountName", "MT" & 1020 ++ i
objLeaf.SetInfo
Set objUser = GetObject("LDAP://cn=" & objLeaf & "," &
objContainer)
objUser.SetPassword "Start123"
Next
As far as I can figure it creates the first user and then something
goes wrong. If I remove the password bit it works. Useres are created
in the right OUs
Help please?
Alex.