Previous Topic: CreateUnitGroup2Next Topic: DeleteUnitGroups


CreateUnitGroupByName

Creates a unit group. You can specify the parent group by its name; if it is not specified the new unit group is created under the group Computers and Users. You can link all discovered computers or existing computers specified by their respective names to the newly created unit group. You can attach a query, specified by its name, to the newly created group for evaluating the group members.

Note: When parameter computerNames is specified and linkAllComputers is set to 1 (true), the parameter linkAllComputers takes precedence; this means that computerNames are ignored and all computers discovered under the domain/enterprise are linked to the newly created group. When query to be linked to the group is specified (to create a dynamic group) and the computers to be associated with the group are also specified (to create a static group), the API returns an error.

Parameters

xsd:string sessionId (m)

Specifies the session id obtained from the login to the web service.

xsd:string parentUnitGroupName

Specifies the name of the parent group under which the unit group is to be created. By default the “Computer and User” group is set as the parent group.

CreateUnitGroupPropertiesByName unitGroupPropertiesByName (m)

Specifies the properties required to create a unit group. Setting all the structure members is not mandatory.

ArrayOfstring computerNames

Specifies the list of computer names to be linked to the group.

xsd: boolean linkAllComputers

Links all registered computers in the domain or enterprise to the group. If set to true, the value of parameter computerNames is ignored.

Return Values

xsd:string uuidOfCreatedUnitGroup

Indicates the UUID of the new unit group, if successfully created.

Remarks

If parameter computerNames is assigned a value (that is, the list of computer names is provided) and the parameter linkAllComputers is also set to true the value of linkAllComputers overrides the value of parameter computerNames.

If the query to be linked to the group (which creates a dynamic group) and the computers to be associated with the group (which creates a static group) are specified at the same time, the API returns an error.

More information:

CreateUnitGroupPropertiesByName