:DISCONNECT
Use the :DISCONNECT script statement to terminate an active connection to the AE system. You can use this statement to disconnect specific Users, User Groups, Agents, or Agent Groups. When disconnecting Users or User Groups, the specified connection must belong to the same Client as the executable object containing the script.
When a User is disconnected, an Automic Web Interface message notifies them that the connection has been interrupted and prompts them to log in again. If you execute this statement when there are no active connections matching the definition, the system ignores it without throwing an error. However, if you specify an invalid User or User Group, script processing aborts and generates an error message.
When targeting Agents, you can specify an Agent Group instead of individual Agents. In this case, the disconnection applies to all active Agents within that group.
Note: The executing User or Agent requires the privilege to cancel processes; otherwise, the script statement fails to execute.
Syntax
:DISCONNECT Connection, Name
Parameters
| Parameter | Description | Format |
|---|---|---|
| Connection |
Type of connection. Allowed values:
Notes:
|
Script literal, script variable, or number |
| Name |
Name of the specific User, User Group, Agent, or Agent Group to disconnect. |
Script literal, script variable, or number |
Examples
The following example disconnects the User SMITH/AE from the AE system.
:DISCONNECT "USER", "SMITH/AE"
The Agent WIN01 is disconnected from the AE system.
:DISCONNECT "HOST", "WIN01"
The next example disconnects all database Agents.
:DISCONNECT "HOSTGROUP", "HOSTG_DB_UNIX"
See Also