Skip to content

Add unit to group

Adds Unit to the specified group in Global.

AddUnitToGroup(Byval UnitName as String, Byval UnitType as String, Byval GroupName as String, Byval GroupType as String) as Boolean

UnitName (String)

The name of the unit

UnitType (String)

Type of Unit

  • “Computer”
  • “User”
  • “Printer”

GroupName (String)

The name of the group

GroupType (String)

The type of the group;

  • “Calendar”
  • “Department”
  • “Reinstall”
  • “Security”
  • “Static”
  • “Dynamic_SQL” (Only Unittype=Printer)
  • “Dynamic_ADSI” (Only Unittype=Printer)

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

VBScript

Set oCMS = CreateObject("CapaInstaller.SDK")
wscript.echo oCMS.SetDefaultManagementPoint("1")
Wscript.echo oCMS.AddUnitToGroup("Klient","computer","test","Static")