Support Forums

returning of an object from jobtracker completedscript block

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.
User avatar
jvierra
Posts: 10024
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: returning of an object from jobtracker completedscript block

Postby jvierra » Wed Nov 25, 2015 11:13 am

Good luck. Glad you got it.
User avatar
dan.potter
Posts: 661
Joined: Wed Oct 08, 2014 6:02 am

Re: returning of an object from jobtracker completedscript block

Postby dan.potter » Wed Nov 25, 2015 11:14 am

sure it does.

$buttonStartJob_Click={
 
$JobScript={
[PSCustomObject]@{mycomputer = $env:computername}
}
 
$UpdateScript={
Param($Job)
 
}
 
$CompletedScript={
Param($Job)
$script:results = Receive-Job -Job $Job
 
}
 
$jobSplat=@{
Name='myjob'
JobScript=$JobScript
UpdateScript=$UpdateScript
CompletedScript=$COmpletedScript
}
 
Add-JobTracker @jobSplat
 
}

Return to “Windows PowerShell”

Who is online

Users browsing this forum: No registered users and 7 guests