cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Calling a CLI command remotely using PsExec

phartwig
12-Amethyst

Calling a CLI command remotely using PsExec

Hello,

Has anyone tried to call a CLI command remotely using PsExec? I have a batch file that run successfully if executed locally, but calling it remotely using PsExec returns the error code 253.

Thank You,

Paul Hartwig

4 REPLIES 4
KaelLizak
14-Alexandrite
(To:phartwig)

Hi Paul,

Could you give us more context, and the exact command parameters you are using?

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
phartwig
12-Amethyst
(To:phartwig)

All,

The issue with calling a CLI command remotly using PsExec is that the remote thick client (IntegrityClient.exe) must not be running. If the client is running the remote call will timeout. Exiting the client will allow for the remote call to execute as expected.

Does PsExec allow you to run the command as a specific user? Also, can you provide the command that PsExec is sending to the command line? Thanks.

phartwig
12-Amethyst
(To:jgorsline)

PsExec does allow for calling the command as a specific user, you just need to pass the -u and -p arguments when call it.

For my use case, I am using the following command to call the CLI command remotely.

C:\Progra~1\PSTools\PsExec.exe \\worker1 C:\\ptc\\IntegrityClient10\bin\im.exe createissue --type="Product Requirement" --port=7001 --hostname=integrityServer --password=password --user=SolutionArchitect --richContentField="Engineering Response=For performance testing. Do not use." --richContentField="Product Requirement Statement=Created for Performance Testing - DO NOT USE"

Top Tags