eg
psexec \\RemotePC -s net localgroup administrators MyDomain\MyUser /add
>out.txt
In this example, out.txt contains:
PsExec v1.31 - execute processes remotely
Copyright (C) 2001-2002 Mark Russinovich
www.sysinternals.com
Connecting to RemotePC...
Starting PsExec service on RemotePC...
Connecting with PsExec service on RemotePC...
Starting net on RemotePC...
net exited on RemotePC with error code 2.
however I want to capture the screen output aswell/instead:
The command completed successfully.
The specified account name is not a member of the local group.
Any help appreciated.
Nick
In some cases adding 2>1& after "> out.txt" ( > out.txt 2>1&) works,
but in the worst cases, you have to redirect the command output to a
file on the remote machine and STDERR to a file on the local machine
(2>), then retrieve the remote file and combine it with the local one.
T.E.D. (tda...@gearbox.maem.umr.edu)
SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.