Created
June 7, 2019 06:19
-
-
Save chriskuech/980ffb381e0917b1aebd18fac8f14f7a to your computer and use it in GitHub Desktop.
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
function Invoke-AfterEach { | |
Param( | |
[scriptblock[]]$ScriptBlock, | |
[scriptblock]$OnTaskComplete | |
) | |
$ScriptBlock | % { | |
Start-Job { | |
Param($action, $callback) | |
&$action | |
&$callback | |
} -ArgumentList ($_, $OnTaskComplete) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment