Skip to content

Instantly share code, notes, and snippets.

@chriskuech
Created June 7, 2019 06:18
Show Gist options
  • Save chriskuech/e38d4cd9ea094f90133596d5adbde256 to your computer and use it in GitHub Desktop.
Save chriskuech/e38d4cd9ea094f90133596d5adbde256 to your computer and use it in GitHub Desktop.
# invokes the action, then calls the callback upon completion
function Invoke-Then([scriptblock]$action, [scriptblock]$callback) {
Start-Job {
&$using:action
&$using:callback
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment