Trying to create a script to change passwords on remote PC's.
what i want to do is use the batch files below.
If PC1 is offline the program returns "Error changing password:"
If PC1 is online the program returns "Password successfully changed"
how do I add code to the batch file so that:
A fail will log to a file called failed.txt
A Good change will log to a file call worked.txt
Your help is truly appreciated.
for /f %%c in (wks.txt) do pspasswd.exe \\%%c administrator xxsomepwd