Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am using tsystem and execute PsTool command to return a value from remote server, I am not getting the correct feedback, It returns:
Starting job Monitor_Running_Services at 12:50 04/06/2020.
[statistics] connecting to socket on port 3653
[statistics] connected
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
Below is the command:
tsystem command: psexec \\\\hostname -u username -p mypassword cmd /c net start | find " + "\"" + "Windows Time" + "\""
Finally figured it out, placing cmd infront of psexec and remove cmd next to /c to get output on local pc
@nmetldev ,check the below link may help to you.
https://community.talend.com/t5/Design-and-Development/tSystem-return-value/td-p/137505
Hi @manodwhb The value is not returning when I run with TSystem, And execution doesn't stop. But when I run on local cmd I do get a value back.
C:\Users\user>psexec \\hostname -u domain\username -p mypassword cmd /c net start | find "Windows Time"
Starting cmd on hostname... on hostname...
Windows Time
cmd exited on hostname with error code 0.
Finally figured it out, placing cmd infront of psexec and remove cmd next to /c to get output on local pc