This is not one of my scripts. This was posted by Sitaram Pamarthi of https://techibee.com on the Technet forums
[code lang=”powershell”]
$strcomputers = Get-Content c:servers.txt
foreach ($strcomputer in $strcomputers) {
$admin=[adsi](“WinNT://” + $strComputer + “/Administrator”) `
$admin.psbase.invoke(“SetPassword”, “Password”) }
[/code]