Skip to content

Restart Agent using SDK

Sets an action to restart the agent on a computer.

RestartAgent(Byval UnitName as String, Byval UnitType as String) as Boolean

UnitName (String)

The name or UUID of the unit.

UnitType (String)

Type of Unit

  • “1” (Computer)
  • “2” (User)

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

Set oCMS = CreateObject("CapaInstaller.SDK")
Wscript.echo oCMS.RestartAgent("Klient", "1")