I am trying to execute a cmdlet (test-connection) against multiple machines in parallel using the background jobs mechanism. The function below is fine until I pass more than 649 hostnames (at least on this machine) before an exception is thrown:

PS > .\test.ps1 .\650\_hostnames.txt

```
Receive-Job : Quota violation
At H:\Development\Powershell\test.ps1:13 char:13
+ Receive-Job <<<< |
+ CategoryInfo " InvalidResult: (:) [Receive-Job], ManagementException
+ FullyQualifiedErrorId : JobStateFailed,Microsoft.PowerShell.Commands.ReceiveJobCommand

```

I would like to still execute the cmdlet as a background job for performance reasons, but control the number of jobs kicked off at a given time. I cannot control the input so I could get a list of many thousands to a few hundred. Any suggestions are appreciated!

test.ps1

```
$wkslist = $args[0]

function IsAlive {
  param(
      [Parameter(
      Mandatory = $true,
      Position = 0)]
      $computername
  )
  test-connection -count 1 -ComputerName $computername -TimeToLive 30 `
  -ThrottleLimit 10 -asJob |
  Wait-Job |
  Receive-Job |
  Where-Object { $_.StatusCode -eq 0 } |
  Select-Object -ExpandProperty Address
}

$ips = [System.IO.File]::ReadAllLines("$wkslist")
IsAlive -computername $ips

```