Mass reset administrator password

Facebookgoogle_plus

Have you ever been in a situation that someone revealed you local administrator in a domain network and now you’re exposed to 1000 computer getting crack any minute?
Well, password reset is in order, but how can we reset 1000 computer? One by one? Using MMC to get into computer management for every computer? That will take years.
There are many options that may be useful, but two methods we tried were good and quick.
Method one is to create a VB script and run it remotely to reset the passwords.
1. Create a list of computers listed one computer in every row under a text file named ‘computers.txt’ and save it under c:\ drive.
2. Copy the following lines to a text file and rename it as VB file.
Dim fso
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set objArgs = WScript.Arguments.Unnamed
 
  ‘InputFile = "C:\computers.txt"
  MyDate = Replace(Date, "/", "-")
  OutputFile = "C:\output-" & mydate & ".txt"
 
  If Not objArgs.Count = 2 Then
        password = WScript.Arguments.Item(0)
        InputFile = WScript.Arguments.Item(1)
        If fso.FileExists(InputFile) Then
                Set txtStreamIn = fso.OpenTextFile(InputFile)
                Set txtStreamOut = fso.OpenTextFile(OutputFile, 2, True)
                Do While Not (txtStreamIn.AtEndOfStream)
                        strComputer = txtStreamIn.ReadLine
                        resetpw strComputer, password
                loop
        Else
                WScript.Echo "Input file doesnt exist."
                usage
        End if
 Else
        usage
 End If
 
  Sub usage()
      WScript.Echo "Usage: cscript local_admin_resetpw.vbs password input.txt"
      WScript.Echo "NOTE: if your password has special characters in it you will have to enclose it in quotes"
  End Sub ‘usage
 
  Sub printOut (data)
      WScript.Echo data
      txtStreamOut.writeline data
  End Sub ‘printOut
 
  Sub resetpw (computer,password)   
      Set objUser = GetObject("WinNT://" & computer & "/Administrator, user")
      printOut "changing the password on " & computer & " to " & password
      objUser.SetPassword """ & password & """
      objUser.SetInfo
  End Sub ‘resetpw
3. Run the VB file.

Method 2 is downloading great software that does all the work in single mouse click.
Visit VNC Scan here and follow the instructions, should be very easy to do.
Good luck.