Skip to content

Get group units

Returns a list of units linked to the group.

GetGroupUnits(Byval GroupName as String, Byval GroupType as String) as ArrayList

GroupName (String)

The name of the group

GroupType (String)

Type of the group

  • “Dynamic_ADSI”
  • “Calendar”
  • “Department”
  • “Dynamic_SQL”
  • “Reinstall”
  • “Static”

The function returns an array of units. Each unit (unitcmp) in the array is a joined line with the character defined with Set splitter.

  • unit.Name
  • unit.Created
  • unit.LastExecuted
  • unit.Status
  • unit.Description
  • unit.GUID
  • unit.ID
  • unit.Type.Name

VBScript

Set oCMS = CreateObject("CapaInstaller.SDK")
wscript.echo oCMS.SetDefaultManagementPoint("1")
Set aUnit = CreateObject("System.Collections.ArrayList")
Set aUnit = oCMS.GetGroupUnits("test","Static")
for each item in aUnit
wscript.echo item
next