title: Start services in parallel
body: <p>I have a script which checks if certain service on different servers is up, if it is not, the script should start the service.</p>
  
  <p>The problem is, it doesn't start the services in parallel, instead it waits until each service is started.</p>
  
  <p>Code:</p>
  
  <pre><code>$server_list = Get-Content -path D:\Path\list_of_servers.txt
  
  $server_list | foreach { 
   (Get-Service -Name '*Service Name*' -computername $_) | Where-Object {$_.status -eq "Stopped"} | Set-Service -Status Running
  }
  </code></pre>
  
  <p>I know it's due to the way the script is written, but maybe some of you have any suggestions how to make it better?</p>
  
  <p>Cheers!</p>