Link profile to group
Description
Section titled “Description”This function is used to link an existing Profile to a group on the instance Management Point. The group can be a global group or a group in a Business Unit.
Syntax
Section titled “Syntax”Public Function AddProfileToGroup(profileID As Integer, groupName As String, groupType As String, businessUnitName As String, changelogComment As String) As BooleanParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| profileID | Integer | The Id of the profile. Get it with Get Profiles. |
| groupName | String | The name of the group. |
| groupType | String | The type of the group: Static, Department, Dynamic_ADSI (or AD), or Dynamic_SQL (or Dynamic). Other group types can’t be linked to a profile. |
| businessUnitName | String | The name of the Business Unit that contains the group. Use an empty string for a global group. |
| changelogComment | String | A comment that is added to the changelog entry of the profile and the group. |
Return value
Section titled “Return value”Returns a boolean value. True if succeeded, false if not. If the profile, the Business Unit or the group isn’t found, or if the group type isn’t valid, the function raises an error.
Example
Section titled “Example”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")