Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set new Password

Status
Not open for further replies.

Soundlover4711

Technical User
Joined
Jul 27, 2005
Messages
15
Location
NL
Hi All!

I'd like to use the following scritp to set the password for service accounts in my domain, but how do I have to modify the script to use usernames and passwords without a InputBox, so that I can add the userenames and passwords hardcoded???
__________________________________________________________
UserName = InputBox("What Account Needs To Be Reset?","Change PWD?")
NewPass = InputBox("Type New Password","Change PWD?")

Set objUser = GetObject _
("LDAP://cn="& UserName & ",ou=test,dc=test,dc=com")
objUser.SetPassword NewPass
objUser.setInfo
Wscript.Echo "Password Changed
__________________________________________________________
 
UserName = "blaaa"
NewPass = "pasword123"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top