Do more with
Wscript.Echo Wscript.Arguments(0)
Set objUser = GetObject(WScript.Arguments(0))
strPassword1 = InputBox("Reset Password For: " & objUser.cn & vbcrlf & _
"User must change this password on next logon", "Password:")
If strPassword1 = "" Then
Wscript.Quit
Else
strPassword2 = InputBox("Confirm Password:")
If strPassword1 = strPassword2 Then
objUser.SetPassword strPassword1
objUser.Put "pwdLastSet", 0
objUser.SetInfo
MsgBox("Password changed!")
Else
MsgBox("Passwords Do Not Match! Cancelling.")
End If
End if
Set objUser = Nothing
Premium Content
You need an Expert Office subscription to comment.Start Free Trial