Package org.metricshub.winrm
Class CommandResult
java.lang.Object
org.metricshub.winrm.CommandResult
The result of a command executed on the remote host: its output streams, its process exit
code, and the time it took.
-
Method Details
-
stdout
Get the standard output of the command.- Returns:
- the stdout content
-
stderr
Get the standard error of the command.- Returns:
- the stderr content
-
exitCode
public int exitCode()Get the process exit code of the command. Windows may report HRESULT codes as unsigned 32-bit values; they are narrowed to the equivalent signedint.- Returns:
- the exit code
-
elapsed
Get the time the command took, from request to completion.- Returns:
- the elapsed time
-
toString
-