Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Change the Local Administrator Password on All My ComputersContent of Change the Local Administrator Password on All My Computers.vbsMD5 Hash: C0D95AD27FA472BB055212F5C4CAB6A7 |
||
On Error Resume Next
Const ADS_SCOPE_SUBTREE = 2 Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" Set objCommand.ActiveConnection = objConnection objCommand.CommandText = _ "Select Name From 'LDAP://DC=fabrikam,DC=com' Where objectClass='computer'" objCommand.Properties("Page Size") = 1000 objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE Set objRecordSet = objCommand.Execute objRecordSet.MoveFirst Do Until objRecordSet.EOF strComputer = objRecordSet.Fields("Name").Value Set objUser = GetObject("WinNT://" & strComputer & "/Administrator") objUser.SetPassword "x%tY7iu8%4f" objRecordSet.MoveNext Loop | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |