Skip to content

Set unit name

Sets the name for a unit.

For a mobile device, the function sends a rename command to the device when possible, and the device gets the new name when it processes the command. To rename a unit and write the change to the changelog, use Rename unit.

SetUnitName(ByVal unitName As String, ByVal unitType As String, ByVal newUnitName As String) As Boolean

UnitName (String)

The name or UUID of the unit.

UnitType (String)

Type of Unit

  • “Computer”
  • “User”

NewUnitName (String)

The new name of the unit

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

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