Skip to content

Delete Group in Business Unit

Deletes a CapaInstaller group in a Business Unit on the instance Management Point. The Windows user who runs the script must have administrator rights for groups on the Management Point.

DeleteGroupInBusinessUnit(ByVal groupName As String, ByVal groupType As String, ByVal unitType As String, ByVal businessUnit As String) As Boolean

GroupName (String)

The name of the group

GroupType (String)

The type of the group. Valid values are “Calendar”, “Department” and “Static”

UnitType (String)

The type of the elements in the group. This can be either “Computer” or “User”. The value isn’t used to find the group, but you must specify it.

BusinessUnit(String)

The name of the Business Unit

Boolean. Returns true if the group is deleted. The function raises an error if the Business Unit or the group isn’t found, or if the user doesn’t have the required rights.

Set oCMS = CreateObject("CapaInstaller.SDK")
wscript.echo oCMS.SetInstanceManagementPoint("1")
wscript.echo oCMS.DeleteGroupInBusinessUnit("Jylland","Static","Computer","Denmark")