# Rename unit

> Renames a unit.

Source: https://docs.capaone.com/capainstaller/sdk-capainstaller-software-development-kit-functions/unit-functions/rename-unit/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

## Description

Renames a unit

## Syntax

RenameUnit(Byval CurrentUnitName As String, Byval UnitType as String, Byval NewUnitName as String) as Boolean

## Parameters

***CurrentUnitName (String)***

The current name of the unit

***UnitType (String)***

Type of Unit

- "Computer"
- "User"

***NewUnitName (String)***

The new name that will be assigned to the unit. Please note that the new name should be nonexistent.

## Return value

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

## Example

**VBScript**

```vb
Set oCMS = CreateObject("CapaInstaller.SDK") 
wscript.echo oCMS.SetInstanceManagementPoint("1") 
wscript.echo oCMS.RenameUnit("Klient","Computer","KlientNew")
```
