Unsupported content


This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Parameterizing NSH scripts

You can parameterize the NSH scripts for use with service blueprint parameters.

For BMC Server Automation documentation related to this topic, see:

To parameterize NSH scripts

  1. Log on to BMC Server Automation.
  2. Click Depot.
    You can start in the Depot with any script in the CSM_Scripts folder (for example, set_apache_admin_password.nsh).
  3. Click the Parameters tab.
  4. Add script parameters (for example, SERVER and WEB_ADMIN_PASSWORD).
    In BMC Server Automation scripting, you pass parameters to a script based on the order they were input. SERVER and WEB_ADMIN_PASSWORD are passed as $1 and $2.
  5. Click the Script tab.
  6. Parameterize the NSH script:

    RESULT='nexec $SERVER /c/Program\ Files/Apache\ Software\ Foundation/Apache2.2/bin/htpasswd -b "C:\Program Files\Apache Software Foundation\Apache2.2\password\htpasswd" admin $PASSWORD'
    echo $EXIT_CODE

    To make the script more readable, pass the parameters to your script by using an alias.

    For example, assign the following aliases:
    When the script is run, the SERVER and PASSWORD parameters will automatically replace $1 and $2, making the script more readable.
    The parameterized NSH script is now available for cloud administrators to use inside service blueprints.

  7. Make sure that the cloud administrator knows the exact name of the NSH script (for example, set_apache_admin_password.nsh).

Where to go from here

For more information:

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.