Hi,
I'm struggling with returning of an object from a finished job from inside the jobtracker framework.
The -jobscript{} block processes and returns some data that are stored in a custom object, then I pass the data to -completedscript{} block with
at the end of the jobscript.
In the
block I use receive-job to retrieve the data:
-CompletedScript {
Param ($Job)
$data = @{ }
$data = Receive-Job -Job $Job
}
That's all fine, the data is stored in $data variable but gets lost just when the -completedscript{} block finishes and leaves the jobtracker function. My question is, how do I store / pass the data from the block so it doesn't get lost when the jobtracker function ends? I was thinking that it has something to do with the Update-Jobtracker function that calls the scriptblock via invoke-command. Can you please help / guide me to better understanding of this framework? I read all about 'creating responsive forms' but couldn't find anything helpful.
Thanks in advance,
Tom