title: Start-Job via Invoke-Command: Job is only available in remote session
body: <p>I'm trying to start TShark on different servers via following command:</p>
  
  <pre><code>Invoke-Command -Session $remoteSession -ScriptBlock {start-job -ScriptBlock {&amp; 'C:\Program Files\Wireshark\tshark.exe' -b filesize:10000 -b files:5 -w "$tsharkResultDirectory\tshark.pcap"} -Name "TShark"}
  </code></pre>
  
  <p>The command works and everything is fine. But when I connect to the remote server via e.g. remote desktop, and perform the command <code>Get-Job</code> nothing is returned.
  So that means that the beforehand started job only runs in the remote session. Does anybody know if there is a way to start a job in "global" scope. I don't want that TShark stops tracing if I accidentally close my PowerShell window.</p>
  
  <p>Thx</p>