How can I change local admin passwords for over 100 servers?

by Jul 2, 2014

Dear all

Do you know how I can get it work when I would have a list of Servers AND a list of generated passwords?

I'm really new into powershell and really got no idea

I got something like

$computers = Get-Content -Path D:PowershellPasswordResetServerlist.txt
$user = "administrator"
$Password = Get-Content -Path D:PowershellPasswordResetPasswords.txt
Start-Transcript D:PowershellPasswordResetlogging.txt
Foreach($computer in $computers)
 $user = [adsi]"WinNT://$computer/$user,user"
 echo "Server: $computer"

But I know it won't work because of of the password list (its not looped!?)

Thank you in advance

A-Learning-Greg 🙂