Start services in parallel
问题 I have a script which checks if certain service on different servers is up, if it is not, the script should start the service. The problem is, it doesn't start the services in parallel, instead it waits until each service is started. 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 } I know it's due to the way the script is