Information

This site will undergo a brief period of maintenance on Friday, 18 December at 12:30 AM Central/12:00 PM IST. During a 30 minute window, site availability may be intermittent.

StaticServerGroup - addServerToServerGroupByName


StaticServerGroup - addServerToServerGroupByName

Description :

This command adds a server by name to a server group (identified by ID).

Return type : com.bladelogic.om.infra.model.group.Group

Command Input :

Variable Name

Variable Type

Description

groupId

Integer

ID of the server group to which the server will be added.

serverName

String

Name of the server to be added.

Example

The following example shows how to add a server by name to a group, which is identified by ID:

Script


SERVER1_NAME="server1"

# Get the ID of the server group by server name

SERVER_GROUP1="/parent/group1"

SERVER_GROUP1_ID=`blcli ServerGroup  [groupNameToId|ServerGroup - groupNameToId] $SERVER_GROUP1`

# Now add the server to the group

RESULT=`blcli StaticServerGroup addServerToServerGroupByName $SERVER_GROUP1_ID $SERVER1_NAME`



 

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

TrueSight Server Automation Command Line Interface 22.2