Previous Topic: addComp—Add Computer List to Template GroupNext Topic: listComp—List Computers of  a Template Group


Example

Assume a software template tgs that is not associated with a query. To determine the targets the user has to add and remove, the target computer manually while the group is unsealed. Suppose the group is sealed and containing a target HHHHH01B that should be removed and a new target named ORIONXH and SPICAYI should be added. After these changes, the group should be sealed again.

First, a list of all targets assigned to the group is provided by the following command:

cadsmcmd templateGroup action=listComp name=tgs

CA IT Client Manager r12
ITCM Command Line Version 12.8.0.xxxx
Copyright (c) 2014 CA. All rights reserved.

Trace mode: Off

Connecting to manager "<default manager>" as user "<default user>" ... ok.
Manager: mymanager
Domain: mydomain
Domain type: Domain
Supporting: CO CCNF USD OSIM 

-------------------------------------------------------------------------------
List of target computer assigned to template group "tgs" 
-------------------------------------------------------------------------------
PPAPPGP0C
HHHHH01B
KKKKK01A
WWWWW01B
-------------------------------------------------------------------------------
Number of target computer read: 4
SDCMD<A000000>: OK

Now to modify the list of assigned targets the group has to be unsealed.

cadsmcmd templateGroup action=unseal name=tgs

Next, the HHHHH01B will be removed from the list by the following command:

cadsmcmd templateGroup action=removeComp name=tgs computer=HHHHH01B

The next command will add ORIONXH and SPICAYI to the list:

cadsmcmd templateGroup action=addComp name=tgs computer=ORIONXH computer=SPICAYI

The modified list is shown by the following command:

cadsmcmd templateGroup action=listComp name=tgs

CA IT Client Manager r12
ITCM Command Line Version 12.8.0.xxxx
Copyright (c) 2014 CA. All rights reserved.

Connecting to manager "<default manager>" as user "<default user>" ...OK.

Manager: mymanager
Domain: mydomain
Domain type: Domain
Supporting: CO CONF USD OSIM

-------------------------------------------------------------------------------
List of target computer assigned to template group "tgs" 
-------------------------------------------------------------------------------
PPAPPGP0C
KKKKK01A
ORIONXH
SPICAYI
WWWWW01B
-------------------------------------------------------------------------------
Number of target computer read: 6
SDCMD<A000000>: OK

At last, the group has to be sealed by the following command:

sdcmd templateGroup action=seal name=tgs