# Get group units

> Returns a list of units linked to a group.

Source: https://docs.capaone.com/capainstaller/sdk-capainstaller-software-development-kit-functions/unit-functions/get-group-units/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

## Description

Returns a list of units linked to the group.

## Syntax

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

## Parameters

*GroupName (String)*

The name of the group

***GroupType (String)***

Type of the group

- "Dynamic\_ADSI"
- "Calendar"
- "Department"
- "Dynamic\_SQL"
- "Reinstall"
- "Static"

## Return value

The function returns an array of units. Each unit (unitcmp) in the array is a joined line with the character defined with [Set splitter](/capainstaller/sdk-capainstaller-software-development-kit-functions/container-functions/set-splitter/).

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

## Example

**VBScript**

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