Skip to content
Discussion options

You must be logged in to vote

Yea that's essentially the approach I've done in the past. Here's an example with a few more methods added to support other streams and stuff like ShouldProcess https://github.com/jborean93/PowerShell-OpenAuthenticode/blob/main/src/OpenAuthenticode/AsyncPSCmdlet.cs. The CancelToken can be removed if you are targeting 7.6+ as it introduces a new PipelineStopToken on the PSCmdlet instance that is automatically tied to stopping the engine.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wgross
Comment options

Answer selected by wgross
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants