Skip to content

Instantly share code, notes, and snippets.

@waldronj
Last active August 29, 2015 14:09
Show Gist options
  • Select an option

  • Save waldronj/0b467ccd3cf29092177f to your computer and use it in GitHub Desktop.

Select an option

Save waldronj/0b467ccd3cf29092177f to your computer and use it in GitHub Desktop.
Workflow, ping in parallel
[System.Array]$arrComputer = 'www.msn.com', 'www.google.com', 'localhost', '127.0.0.1'
workflow TestAllTheConnections{
param(
[System.String[]]$Computers
)
Foreach -Parallel ($c in $Computers){
Test-Connection -ComputerName $c -Count 1 -Delay 1
}
}
TestAllTheConnections -Computers $arrComputer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment