Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 784 Bytes

agentexecutecommand.adoc

File metadata and controls

34 lines (26 loc) · 784 Bytes

AgentExecuteCommand()

AgentExecuteCommand(node, commandName, …) ⇒ Boolean

Execute agent command (action) on given node. Optional arguments starting from 3rd are passed as command arguments to the agent.

Note
Prior to v. 4.2 this function was named AgentExecuteAction
Table 1. Parameters

node

[class-node] object instance (e.g. $node)

commandName

Name of the command to be executed

Optional arguments for command

Return

Boolean indicator of success

Example
>>> AgentExecuteCommand($node, "System.Restart");
true

>>> AgentExecuteCommand($node, "Custom.RestartService", "jetty9");
true

>>> AgentExecuteCommand($node, "nonexisting action");
false