Rename unit
Description
Section titled “Description”Renames a unit.
The Windows user who runs the script needs administrator rights for units on the Management Point that the unit belongs to.
Syntax
Section titled “Syntax”RenameUnit(Byval CurrentUnitName As String, Byval UnitType as String, Byval NewUnitName as String) as Boolean
Parameters
Section titled “Parameters”CurrentUnitName (String)
The current name or UUID of the unit
UnitType (String)
Type of Unit
- “Computer”
- “User”
NewUnitName (String)
The new name that will be assigned to the unit. Use a name that no other unit has.
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.RenameUnit("Klient","Computer","KlientNew")