Delete unit
Description
Section titled “Description”Deletes a unit.
The Windows user who runs the script needs administrator rights for units on the Management Point that the unit belongs to. If several units have the same name, use the UUID to make sure that you delete the right unit.
Syntax
Section titled “Syntax”DeleteUnit(Byval UnitName as String, Byval UnitType as String) as Boolean
Parameters
Section titled “Parameters”UnitName (String)
The name or UUID of the unit.
UnitType (String)
Type of Unit
- Computer
- User
Return value
Section titled “Return value”Boolean. The function returns True if successful, otherwise false.
Example
Section titled “Example”Set oCMS = CreateObject("CapaInstaller.SDK")wscript.echo oCMS.SetInstanceManagementPoint("1")Wscript.echo oCMS.DeleteUnit("Klient","Computer")