Quantcast
Channel: SAPIEN Forums
Viewing all articles
Browse latest Browse all 507

PowerShell GUIs • Re: JobTracker Variable passing

$
0
0
Please don't post the same question in different forums.

To get the data a job, you need to use the Receive-Job command. When use the JpbTracker, this should be done in the scriptblock parameter CompletedScript. It would look something like the following:

Code:

CompletedScript = {
Param ([System.Management.Automation.Job]$Job)
$results = Receive-Job -Job $Job
}
Variables declared in scriptblocks cannot be accessed outside of their scope.

You may find the following helpful:
https://www.sapien.com/blog/2012/05/16/ ... ive-forms/
https://www.sapien.com/blog/2013/03/06/ ... ing-rules/
https://learn.microsoft.com/en-us/power ... rshell-7.4

Statistics: Posted by brittneyr — Thu Apr 18, 2024 11:40 am



Viewing all articles
Browse latest Browse all 507

Trending Articles