Skip to content

Restart Agent using SDK

Sets an action to restart an agent.

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

UnitName (String)

The name of the unit

UnitType (String)

Type of Unit

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

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

VBScript

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