The presence of the
function params([Object]$task,[hashtable]$htOpts) in the
Task Execution Script indicates that parameters should be passed to the execution program.
This is meaningful only for Task Types of java, nodejs or script (and eventually net).
params function is not defined in the Task Execution Script, either the
Options return values are passed if function
options exists or an empty hashtable is used as the parameters.
For a script type program the hashtable is passed as is.
For a Java or NodeJS program the following conversions take place:
If the keyword of the hashtable ends with an
= the keyword (less the
=) is treated as a -def
If the keyword exists but points to a
$null value the -keyword is passed.
otherwise the -keyword value parameter is passed.
function params([Object]$task,[hashtable]$htOpts) in the Task Execution Script returns a
There are several ways this can be implemented. It is necessary to remove extraneous parameters using the hashtable
function. Care must be taken to clone the
$htOpts hashtable as this is also used to persist the values in the
The values can also be inspected in the
fetchJavaMain function and the program to execute changed.
PSEC is an extensive set of Powershell enhancements that, along with other acknowledged works, is deployed into the public domain subject to the limitations detailed below.
More detailed information is found by clicking on the link that triggered this popup