I want to run the sysinternals tool psloglist to get the event log of a server that is on another domain.
If I run
runas /netonly /user:DOMAIN2\USER psloglist \\TARGETSERVER
Then a new command window appears and the I see the correct data being listed.
How can I capture this output in a file on my machine on DOMAIN1?
I tried
runas /netonly /user:DOMAIN2\USER psloglist \\TARGETSERVER > event.log
Which captured the runas password prompt.
I also tried creating a batch file with
psloglist \\TARGETSERVER > event.log
and running
runas /netonly /user:DOMAIN2\USER mybatchfile
but that instantly returns and no command window appears and no file is created.
I presume this is because DOMAIN2\USER cannot create the event.log file on my machine, how can I get around this?
DOMAIN1 has no trust with DOMAIN2 and I cannot added it.