# Get package groups

> Gets groups linked to the specified package.

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

## Description

Gets groups linked to the specified package.

## Syntax

GetPackageGroups(Byval PackageName as String, Byval PackageVersion as String, Byval PackageType as String) as ArrayList

## Parameters

*PackageName (String)*

The name of the package

*PackageVersion (String)*

The version of the package

*PackageType (String)*

The type of package

- "1" (Computerjob)
- "2" (Userjob)

## Return value

An arraylist, containing requested package groups are returned. Each element 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/).

Each joined line (j) consists of these variables;

- j.Name
- j.Type
- j.unitType.ID
- j.Description
- j.GUID
- j.ID

## Example

**VBScript**

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