You can try something like this:
$op=invoke-command -computername test -scriptblock{
& "cmd.exe" /c c:\temp\psbatch.bat 2>&1
$LASTEXITCODE
}
if (@($op)[-1] -eq 0) {echo "success"}
else {echo "failure"}
Force the result to an array, and then test just the last line, which will be the last exit code. Anything echoed before that will be ignored.