get return code from plink?

后端 未结 2 2079
小鲜肉
小鲜肉 2021-02-20 13:30

In a DOS batch script, I\'m running a single command on a remote (also windows) computer using plink. Formerly, this command was only run on the local machine, and was relying

2条回答
  •  旧时难觅i
    2021-02-20 14:31

    That's not possible with plink. The current consensus is to have the remote script echo its exit code to a log file, then use pscp to transfer the log file to the local machine.

    See http://fixunix.com/ssh/74235-errorlevel-capturing-plink.html.

提交回复
热议问题