.vbs script to reset users passwords for non-domain admin accounts?

Associate
Joined
18 Oct 2002
Posts
1,159
Location
Peterborough
.vbs script to reset users passwords for non-domain admin accounts?

so far i have:

strUser = InputBox("Please enter the User's Name that requires the Password to be Reset:")
strOU = InputBox("Please enter the OU that contains the User's Account:")
Set objUser = GetObject("LDAP://CN=" & strUser & ",OU=" & strOU & ",DC=**********,DC=****")
objUser.SetPassword "Passw0rd"
MsgBox "The User's Password has now been Reset Successfully."

but for non-domain admin accounts this clearly isnt going to work, i have created a domain admin account for this but need to basically have the script say: hey i know im not a domain admin account but use these credentials for this operation, anyone got any ideas?
 
What i have actually works, its just that i want it to be run by users without domain access so its a few lines to hardcode the username and password the script has to be run as...
 
Back
Top Bottom