Server - getServerIdByName
Server - getServerIdByName
Description :
This command converts a server name to a server ID. If no server exists by the name you specify, the command fails. This command returns a server ID.
Return type : Integer
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
serverName | String | Name of the server. |
Example
Server IDs are used in many BLCLI commands. This example shows how to find the ID for a given server name:
Script
# Get the ID of the server by server name
SERVER1_NAME="server1"
SERVER1_ID=`blcli Server getServerIdByName $SERVER1_NAME`
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*