Changing Local User Passwords

Hello All, I am new to PowerShell and learning on the fly primarily via my new BFF Google. I need to change the change a local user password on about 250 machines on my domain. The user is a backdoor admin, I’m not a coder by any strech but was handed this. I have found some scripts get me close but then fail.

This is what I have come up with so far, it runs, prompts for me to enter a new password, and completes with no errors. But when I try to login to my machine with the LocalUser account and enter the password I just created it gives me password not correct. Any help would be greatly appriciated. Not even sure if I’m on the right track

Thank you in advance

Get-LocalUser
$computers = Get-Content -path C:\PowerShell\computers.txt
$password = Read-Host -prompt "Enter new password for user" -assecurestring
$decodedpassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($password))
Foreach($computer in (c:\PowerShell\computers.txt))
{
  $computer
  $user = [adsi]"WinNT://$computer/JohnDoe,user"
  $user.SetPassword($decodedpassword)
  $user.SetInfo()
}

Shouldnt that be:

Foreach($computer in $computers)