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: 11054
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: returning of an object from jobtracker completedscript block

Post by jvierra » Wed Nov 25, 2015 11:13 am

Good luck. Glad you got it.

User avatar
dan.potter
Posts: 696
Joined: Wed Oct 08, 2014 6:02 am

Re: returning of an object from jobtracker completedscript block

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

sure it does.

Code: Select all

$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

}

Locked

Who is online

Users browsing this forum: No registered users and 3 guests