# Create AD group

> Creates a CapaInstaller AD group.

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

## Description

Creates a CapaInstaller AD group.

## Syntax

CreateADGroup(ByVal groupName As String, ByVal unitType As String, ByVal LDAPPath As String, ByVal recursive As Boolean) As Boolean

## Parameters

*GroupName (String)*

The name of the group

*UnitType (String)*

The type of the elements in the group. This can be either "Computer" or "User"

*LDAPPath(String)*

The LDAP Path of the elements in the group.

*recursive(String)*

Indicates if the AD group should be processed recursive

## Return value

Boolean. Returns true if the group is created, otherwise false

## Example

**VBScript**

```vb
Set oCMS = CreateObject("CapaInstaller.SDK") 
wscript.echo oCMS.SetInstanceManagementPoint("1") 
wscript.echo oCMS.CreateADGroup("Jylland","Computer","LDAP://OU=CapaInstalled,OU=Workstations,DC=capatest,DC=com",true) 
```
