Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Setting Parameter in a powershell PowerShell script and put them to the next step / powershell PowerShell script in job chain.
...
At every change of status in job chains Job Scheduler parses a temporary file for "namh1. value" pairs. The "namevalue" pairs will be set as order params. The name of the temporary file is availabe available with the environment variable SCHEDULER_RETURN_VALUES. See Passing_parameters_from_shell-jobs_to_JS also for a sample to pass parameters to pure shell jobs.
The sample below describes a job chain with two steps. Both are running the generic job PowerShellExecutor to execute a powershell PowerShell script within JobScheduler.
...
Code Block |
---|
$A="myParam=PowerShellParam" $A | out-file -encoding ASCII $env:scheduler_return_values get-content $env:scheduler_return_values exit $lastexitcode # to change the policy for using powershellPowerShell you can use this .adm file: # http://www.microsoft.com/download/en/confirmation.aspx?id=25119 |
...
Code Block |
---|
"job-node parameter from the previous step:" "myParam=$env:SCHEDULER_PARAM_myParam" exit $lastexitcode # to change the policy for using powershellPowerShell you can use this .adm file: # http://www.microsoft.com/download/en/confirmation.aspx?id=25119 |
...