Change LA pwd to unique pwd on each server


I need some help…I have been tasked with changing the local admin (administrator) account across all servers to a unique pwd per server.

I will be given a txt file with all servers and a unique pwd for each.

I am looking for suggestions on how I could go about making the change.

I know I can utilize the pstools utility pspasswd64.exe in a CMD for loop to get the job done but I would like to attempt a PoSh script.

NOTE: Out of roughly 800 servers they are everything from 2003, 2008 R2, 2012 R2, and 2016 versions.

For /f “tokens=1-2 ” %a in (ws.txt) do pspasswd64.exe %a -u domainAdm_user administrator %b

Contents of WS.txt servername1 password1 servername2 password2 

submitted by /u/rcjay272
[link] [comments]

Leave a Reply