title: Try & Catch not working when using Invoke-Command
body: <p>There's a strange issue in my script.
  I'm invoking a command on some servers. If I can't connect to the server (because it's offline or something) I still want to log that (Server is offline > log.txt)</p>
  
  <p>Apparently, when an error occurs in <code>Try</code> block, the <code>Catch</code> block is not executed.</p>
  
  <p>To test this, I wrote a value to the <code>ComputerName</code> parameter that doesn't exist.
  Here's my code:</p>
  
  <pre><code>Try {
      Invoke-Command -ComputerName hui -ScriptBlock $sb
  }
  Catch {
      Write-Host "Hello"
  }
  </code></pre>
  
  <p>But the Script never puts out "Hello"</p>
  
  <p>The exception I get is a <code>PSRemotingTransportException</code>. I also tried to specify the exception, also didn't work</p>
  
  <p>When I set a breakpoint at the <code>Invoke-Command</code> line, it also ignores the catch block. Why?</p>