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:\Powershell\PasswordReset\Serverlist.txt
$user = "administrator"
$Password = Get-Content -Path D:\Powershell\PasswordReset\Passwords.txt
Start-Transcript D:\Powershell\PasswordReset\logging.txt
Foreach($computer in $computers)
{
$user = [adsi]"WinNT://$computer/$user,user"
$user.SetPassword($Password)
$user.SetInfo()
echo "Server: $computer"
}
Stop-Transcript
But I know it won't work because of of the password list (its not looped!?)
Thank you in advance
A-Learning-Greg :-)