One user was wondering how to output from a script block registered to an event to the script that set the event handler.
Register-ObjectEvent returns a job object corresponding to the new event, which the setting script can store. That object has an
Output property that is an array of the values produced. When the event handler block returns a value (just like normal functions do), PowerShell stashes it in the
Output array.
No comments:
Post a Comment