Restart Agent using SDK

Description

Sets an action to restart an agent.


Syntax

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


Parameters

UnitName (String)

The name of the unit

UnitType (String)

Type of Unit

  • "1" (Computer)
  • "2" (User)


If a user is specified, the agent on the computers linked to the user will be restarted.


Return Value

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


Example

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