title: Azure Automation: Parallel Job Handling (start-job)
body: <p>I'm trying to convert an Azure PowerShell script to an Azure Automation Runbook, but I've run into an issue when using the "start-job" command. After the inline scripts are called, the jobs fail shortly after starting. It seems to me that the parameters are not passing through properly. </p>
  
  <p>Is there something I'm missing to properly pass parameters within Azure Automation?</p>
  
  <p>The commands that are failing:</p>
  
  <p><code>$CreatevNetGateway = {
      param($vNetName)
      New-AzureVNetGateway -VNetName $vNetName -GatewayType DynamicRouting
  }
  &lt;#Start the jobs#>
  Start-Job $CreatevNetGateway -ArgumentList $vNetName1
  Start-Job $CreatevNetGateway -ArgumentList $vNetName2
  Wait-Job *</code></p>