We are using PsExec to run commands on a remote machines. Unfortunately, build task that invokes psexec shows incomplete and out-of-order output.
For example, this command line task prints the content of disk C on a remote machine. Task parameters:
Executable: c:\tools\psexec.exe
Arguments: -accepteula -u user_name -p password \10.1.2.3 cmd /c dir c:\
Actual Build output contains only the first line from directory listing, and this line appears before the "connecting to":
Executing the following commandline. (workingFolder = C:\BuildAgents\1_work\yyy\xxx)
cmd /c c:\tools\psexec.exe -accepteula -u admin -p 1 \10.1.2.3 cmd /c dir c:\
Error message highlight pattern:
Warning message highlight pattern:
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
Volume in drive C has no label.
Connecting to 10.1.2.3...
Starting PSEXESVC service on 10.1.2.3...
Connecting with PsExec service on 10.1.2.3...
Starting cmd on 10.1.2.3...
cmd exited on 10.1.2.3 with error code 0.
When I ran this command from command prompt directly, I get the correct output:
Volume in drive C has no label.
Volume Serial Number is 1029-938E
Directory of c:\
12/21/2015 03:00 PM
Program Files
01/22/2016 03:19 PM Program Files (x86)
11/18/2014 05:30 PM Users
01/22/2016 02:16 PM Windows
<...>
cmd exited on 10.1.2.3 with error code 0.
When started from the command prompt, PsExec shows connection progress in the same line of the console by overwriting it multiple times. Maybe this breaks something in TFS build agent?
We are using PsExec to run commands on a remote machines. Unfortunately, build task that invokes psexec shows incomplete and out-of-order output.
For example, this command line task prints the content of disk C on a remote machine. Task parameters: Executable: c:\tools\psexec.exe Arguments: -accepteula -u user_name -p password \10.1.2.3 cmd /c dir c:\
Actual Build output contains only the first line from directory listing, and this line appears before the "connecting to":
Executing the following commandline. (workingFolder = C:\BuildAgents\1_work\yyy\xxx) cmd /c c:\tools\psexec.exe -accepteula -u admin -p 1 \10.1.2.3 cmd /c dir c:\ Error message highlight pattern: Warning message highlight pattern: PsExec v2.11 - Execute processes remotely Copyright (C) 2001-2014 Mark Russinovich Sysinternals - www.sysinternals.com Volume in drive C has no label. Connecting to 10.1.2.3... Starting PSEXESVC service on 10.1.2.3... Connecting with PsExec service on 10.1.2.3... Starting cmd on 10.1.2.3... cmd exited on 10.1.2.3 with error code 0.
When I ran this command from command prompt directly, I get the correct output:
PsExec v2.11 - Execute processes remotely Copyright (C) 2001-2014 Mark Russinovich Sysinternals - www.sysinternals.com
Volume in drive C has no label. Volume Serial Number is 1029-938E
Directory of c:\
12/21/2015 03:00 PM
cmd exited on 10.1.2.3 with error code 0.
When started from the command prompt, PsExec shows connection progress in the same line of the console by overwriting it multiple times. Maybe this breaks something in TFS build agent?
Build agent version: 1.89.1