Skip to main content
1-Visitor
October 15, 2014
Question

Calling a CLI command remotely using PsExec

  • October 15, 2014
  • 2 replies
  • 2081 views

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

    2 replies

    16-Pearl
    October 20, 2014

    Hi Paul,

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

    Regards,
    Kael

    1-Visitor
    October 24, 2014

    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.

    1-Visitor
    October 24, 2014

    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.

    1-Visitor
    October 24, 2014

    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"