Closed GQsj closed 5 years ago
I would imagine that it works the same way as exit codes in powershell commands, so statusCode 0 would mean successful execution and anything else would mean error.
As @Tuupertunut said, the statusCode is the exit code in powershell commands.
There are some gotchas about these exit codes, and error handling, in winrm and powershell. There are some useful tips at https://docs.cloudsoft.io/blueprints/base-blueprints/winrm/index.html
I hope that answers your question - marking this issue as closed.
Does the attribute "statusCode" in class "WinRmToolResponse" show the execute state? Can anyone tell me the meaning of the return number? Or I can only know the exec is right if the "stdout" has value, and if the "stdout" doesn't have value, the execute of the PS command is wrong?