# Set unit status

> Sets the status of a unit to active or inactive.

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

## Description

Sets the status of the unit.

## Syntax

SetUnitStatus(Byval UnitName as String, Byval Status As String) As Boolean

## Parameters

***UnitName (String)***

The name of the unit

***Status (String)***

The new status

- "Active"
- "Inactive"

## Return value

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

## Example

**VBScript**

```vb
Set oCMS = CreateObject("CapaInstaller.SDK") 
wscript.echo oCMS.SetUnitStatus("Klient","Inactive")
```
