Page tree
Skip to end of metadata
Go to start of metadata

Description

 Adds unit to a folder.


Syntax

 AddUnitToFolder(Byval UnitName as String, Byval UnitType as String, Byval FolderStructure as String, Optional Byval CreateFolder as Boolean = False) as Boolean


Parameters

UnitName (String)

The name of the unit, or the uuid of the unit

UnitType (String)

Type of Unit

  • "Computer"
  • "User"

FolderStructure (String)

The folder structure to which the unit should be added

CreateFolder (Boolean)

An optional parameter stating wether the folder should be created if it does not exist. Default value is; False


Return Value

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


Example

VBScript
Set oCMS = CreateObject("CapaInstaller.SDK") 
wscript.echo oCMS.SetDefaultManagementPoint("1") 
wscript.echo oCMS.AddUnitToFolder("Klient","Computer","Upgrade\cms4",true) 



  • No labels