bofhrevenge2
MIS
Hi all, a very generous guy has supplied me with a script to reset passwords in an Active Directory environment the only problem is that it relies on the OU being specified.
Could some one suggest a way that this could be altered so that the OU will not have to be specified?
Would it be posible to extract a flat file from the PDC emulator?
Cheers.
Could some one suggest a way that this could be altered so that the OU will not have to be specified?
Would it be posible to extract a flat file from the PDC emulator?
Cheers.
Code:
'==========================================================================
'
' NAME: PasswordReset.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.thespidersparlor.com[/URL]
' DATE : 11/30/2004
'
' COMMENT: <comment>
'
'==========================================================================
UserString = InputBox "Enter Username to set password for.","What User?"
newPass = InputBox "What should the password be?"
Set objUser = GetObject _
("LDAP://cn=" & UserString & ",ou=users,dc=fabrikam,dc=com")
objUser.SetPassword newPass
If err then
msgbox "Error Encountered"
else
msgbox "Password Set!"
End if