Skip to content

Instantly share code, notes, and snippets.

@thomasrayner
Last active December 27, 2018 20:18
Show Gist options
  • Save thomasrayner/220b472f767903b928ac34632e4d77e0 to your computer and use it in GitHub Desktop.
Save thomasrayner/220b472f767903b928ac34632e4d77e0 to your computer and use it in GitHub Desktop.
look at all the fun that happens
workflow Test3 {
param (
[parameter()]
[String]$Number
)
Start-Sleep -Seconds 10
if ($Number -eq 'One') {
return 1
}
if ($Number -eq 'Two') {
return 2
}
}
workflow Test2 {
param (
[parameter()]
[String]$Number
)
$returnValues = Test3 -Number $Number
$output = "$Number : $returnValues"
Write-Warning $output
}
workflow Test1 {
$index = 0
do {
$tests = @('One', 'Two')
ForEach -Parallel ($test in $tests) {
Test2 -Number $test
}
$index++
} while ($index -lt 5)
}
Test1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment