I was working on a script to reset password of local admin in workgroup computers. I have more than 500 computers.
I created below code to automate this task, but somehow it is not working. When I am using single computer name in this same script it works.
In error sometime it says “Exception calling “Invoke” with “2” argument(s): "The specified local group does not exist.” OR “Exception calling “Invoke” with “2” argument(s): "The network path was not found.”
The List.txt file contains below lines and there is no space
I can ping/resolve/browse these PCs.
Could someone please suggest me on this.
Admin.txt file attached.