0 pts.
 Changing local admin password
A few months agon I came across a software where you can change the local admins password on several machines at once. It basically grabs a list from active directory of the computers and allows you to change the password. For the life of me I can't remember where I saw it...or who made it...Does anyone out there know? I remember it started with a "K". I am sorry if this isn't the right place to ask...but someone is asking me about this software...and needs to change about 500 pc's local admin passwords...and he said he tried a script and that didn't work. Anyone know?

Software/Hardware used:
ASKED: June 8, 2005  12:03 PM
UPDATED: June 10, 2005  3:34 AM

Answer Wiki:
' This should work. ' Change Administrator password for Window XP Professional computers. strDomainSuffix = "DC=MYDOMAIN,DC=local" strDomain = "MYDOMAIN" strUser = "Administrator" strPassword = "Passw0rd" Const ADS_SCOPE_SUBTREE = 2 Const ADS_UF_DONT_EXPIRE_PASSWD = &H10000 Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" Set objCommand.ActiveConnection = objConnection ' Taylor this search to return the computers you want. objCommand.CommandText = "" _ & "select Name " _ & "from 'LDAP://" & strDomainSuffix & "' " _ & "where objectClass='computer' " _ & "and operatingSystem='Windows XP Professional' " _ & "" objCommand.Properties("SearchScope") = ADS_SCOPE_SUBTREE objCommand.Properties("Cache Results") = False objCommand.Properties("Timeout") = 300 Set objRecordSet = objCommand.Execute objRecordSet.MoveFirst Do Until objRecordSet.EOF strComputer = objRecordSet.Fields("Name").Value Set objUser = GetObject("WinNT://" & strComputer & "/" & strUser & ",user") lUserFlags = objUser.Get("userFlags") lUserFlags = lUserFlags Or ADS_UF_DONT_EXPIRE_PASSWD objUser.Put "userFlags", lUserFlags objUser.SetPassword strPassword objUser.SetInfo objRecordSet.MoveNext Loop
Last Wiki Answer Submitted:  June 10, 2005  3:34 am  by  Amigus   0 pts.
All Answer Wiki Contributors:  Amigus   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _