title: Why are Powershell Jobs so slow?
body: <p>When I execute a simple statement locally</p>
  
  <pre><code>$path = 'C:\Windows\System32\WindowsPowerShell\v1.0'
  gci $path
  </code></pre>
  
  <p>I see the response immediately. But when I execute it as job on my local machine</p>
  
  <pre><code>$start = get-date
  $path = 'C:\Windows\System32\WindowsPowerShell\v1.0'
  $cmd = [scriptblock]::Create("gci $path")
  $jnr1 = Invoke-Command -computer localhost -ScriptBlock $cmd  -asJob
  Wait-Job $jnr1
  Receive-job $jnr1
  $end = Get-date
  ($end - $start).totalseconds
  </code></pre>
  
  <p>I have to wait 55 seconds. From my unix experience a decade ago. I would expect background jobs to run nearly as fast as foreground jobs. </p>
  
  <p>Are there ways to speed up the execution of PowerShell background jobs?</p>