This by request script will allow you to enter an NT or Active Directory (AD) Domain Name and User Name and will change the corresponding user’s domain Password.
VBS Script:
strDomain = InputBox ("Enter Domain Name")
strUser = InputBox ("Enter User Name")
strPassword = InputBox ("Enter Password")
On Error Resume Next
Set objUser = GetObject("WinNT://" & strDomain & "/" & strUser & ",User")
objUser.SetPassword strPassword
objUser.SetInfo
If Err.Number <> 0 Then
MsgBox "Error: An Incorrect Domain Or User Name Was Entered!"
Err.Clear
Else
MsgBox "The Password Has Been Changed For " & UCase(strDomain) & "\" & UCase(strUser)
End If
No Comments