Change all admin passwords

I stumbled upon something that made me remember the following story.

On June 3rd, 2019, I was tasked to change ALL local Admin passwords for all the PCs in our network which covers half of the USA.

My boss comprised of the whole IT department until I joined the company. His instructions were:

1. Call each location
2. Ask which computer is not being used so I could connect to it
3. Connect and do the task
4. Repeat

One pass through this process would take around 10 minutes per call.

In my computation, it would take me a minimum of 7 working days to do all this.

I encountered a problem with this process on my 2nd (or was it 3rd) computer. When I’m told the computers are all being used, I couldn’t do anything but wait and move on to the next location. I was planning on going down the list alphabetically to prevent missing on some.

In the middle of doing this my boss called and told me to also get the serial numbers of each PC to make sure the IT list is accurate and complete.

In the remote access software we’re using, I noticed one can connect to a remote PC using the command prompt.

Being fairly familiar with Linux and comfortable with using the terminal (or command prompt in Windows,) I was sure I could do the 2 tasks using the command line. This way I won’t have to call each location, ask which PC is not being used, and call back when I’m done with one PC to repeat the process.

So I did a quick search on command prompt commands and their syntax. Of course, there are ways to change user passwords and get the serial number of the PC using the command prompt. Now we’re talking!

So I modified my process:

1. Connect to the remote PC using the command prompt
2. Type in the command to change the password
3. Type in the command to get the serial number
4. Copy the serial number, ALT+Tab to my list, paste the serial number
5. Exit the command prompt

This new process using the terminal took me less than 50 seconds per computer.

The tasks that were supposed to take me a minimum of 7 days took me 1 day to finish.

Gotta love the terminal!

About the Author