Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Add NSH Script - Parameters

<[^>]+?>","")"/>

<[^>]+?>","")" class="contextID">

The Parameters panel lets you define parameters that are replaced with server property values when a script runs. Using this panel, you can add flags to parameters, you can specify whether the flag is required at runtime, and, if necessary, require a value to be provided for the flag. In addition, you can define a default value for a flag, make the default value editable when the script is run, and require a value to be entered for the flag at runtime.

When you deploy a Network Shell script, BMC Server Automation automatically generates a master script that controls the script's deployment and execution. The system uses the parameters you define here to generate values in the master script.

If you are running a script one time against multiple hosts (as defined using the Add NSH Script - Script Options panel), you must pass the %h or %f macro as a parameter when you execute the script. The %h macro is replaced by a space-delimited list of host names. The %f macro is replaced by a file containing a list of host names.

To add a parameter, click Add Parameter . To modify an existing parameter, select it in the Script Parameters list and then clicking Update Parameter . Either of these actions displays the Add parameter dialog box, which has the following options:

Description

Optional descriptive text.

Flag

Enter a flag if the parameter requires one.
For example, you could enter a flag like -d to indicate that a script runs in debug mode. Or, you might enter a flag, such as -b, that requires a build number for the script to execute. In the latter case, check the Accepts value option to ensure that a value is specified for the flag.

Parameter flag required at runtime

Check if the flag is used when the Network Shell Script Job runs. If you do not check this option, the person who runs the Network Shell Script Job can choose whether the job should use the flag. By default this option is not checked.

Accepts value

Check if the flag can accept a value.

Default value

Enter a value.
If you want the default value to include a reference to a property value that is resolved when the script runs, enter a variable for that property in the Value column, bracketed with double question marks (such as ??WINDIR??/rsc). Alternatively, you can click Select Property to find and enter the appropriate property. For more information about this tool, see Inserting a parameter.

Editable

Check if the value can be edited when you run the script.

To reposition a parameter within the list, select the parameter and click the up or down arrow.

To remove a parameter, select the parameter and click Delete .

Was this page helpful? Yes No Submitting... Thank you

Comments