Created
December 22, 2016 20:43
-
-
Save bohdanszymanik/ac8cee4959e2a1ce9e96e7df8907a684 to your computer and use it in GitHub Desktop.
Very cool - Split-PipeLine is a very handy tool!
This file contains hidden or 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
| 1..10 | . {process{ $_; sleep 1 }} | |
| function giveMeTwo {2} | |
| $log = "Barney" | |
| $src = "c:\temp" | |
| 1..10 | Split-Pipeline -Count 2 -Variable log,src -Function giveMeTwo {process{ write-host "Value: $_ from thread $([System.Threading.Thread]::CurrentThread.ManagedThreadId) for $log, $src" | |
| write-host $(giveMeTwo) | |
| sleep 1 }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment