Skip to content

Set unit status

Sets the status of a computer. If the computer already has the status, the function returns True without changing anything.

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

UnitName (String)

The name or UUID of the computer. Only computers are supported. If several computers have the same name, use the UUID.

Status (String)

The new status

  • “Active”
  • “Inactive”

Other status values aren’t accepted.

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

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