Skip to content

Instantly share code, notes, and snippets.

@NaClYen
Created November 22, 2021 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NaClYen/4cfd16144e9cad38f852d0548e4ff1f6 to your computer and use it in GitHub Desktop.
Save NaClYen/4cfd16144e9cad38f852d0548e4ff1f6 to your computer and use it in GitHub Desktop.
powershell Wait-Job for multi jobs
function Wait-Test {
$a = Start-Job -ScriptBlock { ping 8.8.8.8 }
$b = Start-Job -ScriptBlock { echo "test" }
Wait-Job $a,$b
echo "done"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment