Thanks for the information, however, that just tells me how to get the output back - which I already do.

Unfortunately, there is not a reliable way to determine from the output whether the command failed or not. I need the return code issued from the command to be able to do that.