Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to return a cmd value from remote server

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" + "\""

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Finally figured it out, placing cmd infront of psexec and remove cmd next to /c to get output on local pc

View solution in original post

3 Replies
manodwhb
Champion II
Champion II

Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

Finally figured it out, placing cmd infront of psexec and remove cmd next to /c to get output on local pc