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.

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*

BMC Server Automation Command Line Interface 8.3