I have multiple machines in a workgroup. Each has the same admin user and password and I need to change the password in all of them The part of the script that does this is:
$user = [adsi]"WinNT://$computer/$username"
$user.SetPassword($password)
$user.SetInfo()
I get this error:
The following exception occurred while retrieving member "SetPassword": "The network path was not found.
I tried this: How to Run PowerShell Commands on Remote Computers but it doesn't help
I turned the firewall on the remote machines off and then it worked... The question is, what rule do I need in the firewall to allow this? I couldn't figure out which port/protocol