# Link profile to group

> Links an existing profile to a group.

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

## Description

This function is used to link an existing Profile to a group

## Syntax

**VBScript**

```vb
Public Function AddProfileToGroup
(profileID As Integer, groupName As String, groupType As String, businessUnitName As String, changelogComment As String) As Boolean
```

## Parameters

## Return value

Returns a boolean value. True if succeeded, false if not.

## Example

**VBScript**

```vb
Set oCMS = CreateObject("CapaInstaller.SDK") 
Wscript.echo oCMS.SetDatabaseSettings("ServerName", "CapaInstaller", False)
Wscript.echo oCMS.SetInstanceManagementPoint("2")

Wscript.echo oCMS.AddProfileToGroup(28, "Sales", "Department", "Skanderborg", "Added profile to bu-grp from SDK")
Wscript.echo oCMS.AddProfileToGroup(14, "Dev", "Static", "", "Added profile to grp from SDK")
```
