Skip to content

Assign Profile to Business Unit

This function is used to create assign an existing Profile to a Business Unit.

Public Function AssignProfileToBusinessUnit
(profileID As Integer, businessUnitName As String, changelogComment As String) As Boolean

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

VBScript

Set oCMS = CreateObject("CapaInstaller.SDK")
oCMS.SetDatabaseSettings("ServerName", "CapaInstaller", False)
Wscript.echo oCMS.SetDefaultManagementPoint("2")
Wscript.echo oCMS.AssignProfileToBusinessUnit(28, "Skanderborg", "Added profile to BU from SDK")