Last active
December 27, 2018 20:18
-
-
Save thomasrayner/220b472f767903b928ac34632e4d77e0 to your computer and use it in GitHub Desktop.
look at all the fun that happens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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