Information
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.

CustomCmd - createLocalCustomCmd


CustomCmd - createLocalCustomCmd

Description :

This command creates a custom command line interface command that can run on a local host.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

Name

String

Name of the custom command.

objectType

Integer

The type of server object that this command can run against (SERVER - 5004, DIRECTORY - 8, FILE - 7).

OS

Integer

ID of the operating system (Unknown - 51, AIX - 35, HPUX - 5, LINUX - 3, SOLARIS - 2, WINDOWS - 1).

Command

String

Command string.

runtimeArgs

Boolean

Whether or not the user can enter additional arguments at execution time.

autoClose

Boolean

Whether or not to close the command window after the command executes.

executeType

Integer

If you want to run this command once against all hosts, set this variable to 0. If you want to run this command separately against each host, set this variable to 1.

windowType

Integer

If you want to open a separate window for each host this command runs on, set this variable to 1. If you want to use the same window for all hosts, set this variable to 2.

quickLaunch

Boolean

If this command is designed to execute against just one host, set this variable to true. If this command is designed to let the user choose additional hosts after specifying the initial target host, set this variable to false.

Example

The following example creates a local custom command that can be executed against a Solaris and AIX server and file.

Script


#

# script constants

#

SERVER_TYPE=5004

DIRECTORY_TYPE=8

FILE_TYPE=7





UNKNOWN_OS=51

AIX_OS=35

HPUX_OS=5

LINUX_OS=3

SOLARIS_OS=2

WINDOWS_OS=1





MULTIWINDOW_TYPE=1

SINGLEWINDOW_TYPE=2

MULTIHOST_TYPE=1

SINGLEHOST_TYPE=0





blcli CustomCmd createLocalCustomCmd "NSH Here" $SERVER_TYPE $SOLARIS_OS "nsh -D //%H/"%p/"" false false $SINGLEHOST_TYPE $SINGLEWINDOW_TYPE true

blcli CustomCmd addAssociationToCustomCmd $SERVER_TYPE "NSH Here" $FILE_TYPE

blcli CustomCmd addOSToCustomCmd $SERVER_TYPE "NSH Here" $AIX_OS

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.3