use of com.iwave.ext.windows.winrm.winrs.WinRS in project coprhd-controller by CoprHD.
the class WindowsSystemWinRM method executeCommand.
public CommandOutput executeCommand(String commandLine) throws WinRMException {
WinRS winrs = new WinRS(target);
debug("Running: %s", commandLine);
CommandOutput output = winrs.executeCommandLine(commandLine);
if (output.getExitValue() != 0) {
debug("Exit Value: %d", output.getExitValue());
}
if (StringUtils.isNotBlank(output.getStdout())) {
debug("STDOUT: \n%s", output.getStdout());
}
if (StringUtils.isNotBlank(output.getStderr())) {
debug("STDERR: \n%s", output.getStderr());
}
return output;
}
Aggregations