Testing the script results
Assuming your job ran successfully (see Creating and running a job that uses the NSH script), you can now examine your enrolled servers to see if the script correctly set MY_PROPERTY
to the value "some Value". You can test results by using the BLCLI or the BMC Server Automation Console:
Testing the script results by using the BLCLI
- Start NSH, authenticate, and connect to the Application Server as described in Setting up to run BLCLI commands in an NSH shell.
- Use the
Server printPropertyValue
command to display the current value ofMY_PROPERTY
. For the first argument, pass in the host name of a server enrolled in your system.
MY_NSH_PROMPT% blcli_execute Server printPropertyValue "myServer" "MY_PROPERTY"
The command returns the value of MY_PROPERTY. In this case, the script correctly set it to "some Value".
some ValueMY_NSH_PROMPT%
You have successfully completed the following:
- Run a BLCLI command at the CLI.
- Examined an NSH script that uses BLCLI commands.
- Run the NSH script.
- Verified the script results.
Where to go from here
Before going on to use other BLCLI commands in your own scripts, take a look at BLCLI tips.
Testing the script results by using the BMC Server Automation Console
- Expand the Servers folder and navigate to one of your servers.
- Click the server name and note that Basic properties for the server appear in the lower left panel, as follows:
- The property you added at the beginning of this tutorial (MY_PROPERTY) is an Extended property, so expand the Extended node (that is, click the plus sign).
- Scroll through the Extended properties until you reach MY_PROPERTY. Note that it is correctly set to "some Value" as specified in the script.
You have successfully completed the following:
- Run a BLCLI command at the command line.
- Examined an NSH script that uses BLCLI commands.
- Run the NSH script.
- Verified the script results.
Where to go from here
Before going on to use other BLCLI commands in your own scripts, take a look at BLCLI tips.
Was this page helpful? Yes No
Submitting...
Thank you
Comments
Log in or register to comment.