This is the script I have that shows users and then lets you input a password into a box and reset it via that. But I made it output to a msgbox to see its working and all passwords are reset to '25':
everything else i need it to do works, i can update descriptions and usernames etc, its just the password is coming up as that.Code:$passbox = GUICtrlCreateInput("", 750, 65, 50, 20) Func UpdatePass() $leftfqdn = ReadFQDNFromGUILeft() $leftsam = _ADDNToSamAccountName ($leftfqdn) $ObjUser = ObjGet("LDAP://" & $leftfqdn) $objUser.SetPassword (GUICtrlRead($passbox)) $objUser.Put ("pwdLastSet", 0) $objUser.SetInfo () MsgBox(0, "", "Password has been reset to " & $passbox & @CRLF & "User will be asked to change password at next logon") EndFunc
its driving me mental!



LinkBack URL
About LinkBacks
Reply With Quote
