Link profile to group


Description

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

Syntax

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

Parameters


ProfileId(Integer)

The ID of the profile

GroupName(String)

The name of the Group

GroupType(String)

The type of the Group

  • AD
  • Department
  • Dynamic
  • Static


BusinessUnitName(String)

The name of the Business Unit where the group is located. If en empty string is specified, the group will be found in Global

ChangelogComment (String)

A comment that will be added to the changelog entry on the proifile and the group

Return value

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

Example

VBScript
Set oCMS = CreateObject("CapaInstaller.SDK") 
Wscript.echo oCMS.SetDatabaseSettings("ServerName", "CapaInstaller", False)
Wscript.echo oCMS.SetDefaultManagementPoint("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")