computing
  • 1

Solved PSEXEC To Run .exe On Remote Client And Log Results

  • 1

I am using psexec to run an .exe that is stored in a directory called “temp” on a remote computer. After the .exe is finished executing a results log file is created in another direcotry called “logs”. What I want happen is to have a new log file generated each time a run the script. I would like the log file to contain the current date, computer name and time that the script was ran.

I am running something like this currently:

psexec \\client-01 c:/temp/execute.exe /q
echo %date%, %computername%, %time% >> Logs/results.log 2>&1

When I run this script I get the following output:

date, computername, time……that is it………..

Shouldn’t I get a message that says the the .exe exited on the client with error code whatever?

Share

1 Answer

  1. psexec \\client-01 c:/temp/execute.exe /q >> Logs/results.log 2>&1
    echo %date%, %computername%, %time% >> Logs/results.log

    maybe this instead?

    :: mike

    • 0