Powershell Execute remote exe with command line arguments on remote computer

后端 未结 5 1848
粉色の甜心
粉色の甜心 2020-12-01 12:10

I\'ve searched all over and tried different variations of commands, but I am still not there yet.

My goal is to run an exe that already resides on a remote machine a

5条回答
  •  天涯浪人
    2020-12-01 13:09

    I have been trying to achieve this by using 1 row single entry but I ended that Invoke command did not worked successfully because it is killing the process immediately after starting despite it can work if you are entering the session and waiting enough before exiting.

    The only working way I could find, for example, to run a command with arguments and space on the remote machine HFVMACHINE1 (running Windows 7) is the following:

    ([WMICLASS]"\\HFVMACHINE1\ROOT\CIMV2:win32_process").Create('c:\Program Files (x86)\Thinware\vBackup\vBackup.exe -v HFSVR12-WWW')
    

提交回复
热议问题