Skip to content

Add unit to calendar group

Adds the unit to the calendar group.

The unit must be linked to a Management Server. The function looks for the calendar group on the Management Point that the unit belongs to. The Windows user who runs the script needs Manager rights for groups on that Management Point.

AddUnitToCalendarGroup(Byval Unitname as String, Byval UnitType as String, Byval CalendarGroupName as String) as Boolean

UnitName (String)

The name or UUID of the unit.

UnitType (String)

Type of Unit

  • “Computer”
  • “User”

CalendarGroupName (String)

Calendar group name

 Boolean. The function returns True if successful, otherwise false.

Set oCMS = CreateObject("CapaInstaller.SDK")
wscript.echo oCMS.SetInstanceManagementPoint("1")
wscript.echo oCMS.AddUnitToCalendarGroup("Klient","Computer","Weekly")