I use the batch below. with the command pspasswd I am changing the local administrator password of the several machines which listed in "MachineSource.txt".
To Access to the machine admin user is "authorized_user" and password is "authorized_user_pass".
I want to have Error log. But the end part of the command, you se >2 d:\Errorlog.txt" saving only the last transaction's log.
How do I append every transaction's or only error transactions's log that pspasswd command does.
The Batch is:
for /F "usebackq delims==" %%I in ("MachineSource.txt") do Call :begin %%I
pspasswd \\%srv% -u auhorized_user -p authorized_user_pass administrator abc123 2> "D:\ERRORLOG.TXT"