CMS_AddComputerToStaticGroup
Description
Section titled “Description”Adds the computer to one or more static groups.
For Business Unit support, see Business Unit support
If the static group doesn’t exist, it’s created.
Syntax
Section titled “Syntax”CMS_AddComputerToStaticGroup(sUnit, sGroup) as Boolean[bool] CMS_AddComputerToStaticGroup -group <string>Parameters
Section titled “Parameters”sUnit (String)
Section titled “sUnit (String)”Not used. The function always applies to the computer that runs the package. Pass gsUnitName. PowerShell doesn’t have this parameter.
sGroup (String)
Section titled “sGroup (String)”Group name. To specify more than one group, separate the names with commas, for example "Zone1,Zone2".
Return value
Section titled “Return value”Boolean. True if the request was processed by the CapaInstaller server. The function also returns True if the group can’t be found, so use CMS_GetGroupMembership if you need to confirm the membership.
Example
Section titled “Example”If bStatus Then bStatus = CMS_AddComputerToStaticGroup(gsUnitName, "CapaInstaller")If bStatus Then bStatus = CMS_AddComputerToStaticGroup(gsUnitName, "Zone1,Zone2")CMS_AddComputerToStaticGroup -group 'static1'Related functions
Section titled “Related functions”CMS_RemoveComputerFromStaticGroup Constants Package Property Variables Business Unit support