KBI 311046 New Feature: Define Custom Variables In WMI/PowerShell Script Rule And Pass Them To Argent Console Alerts


Argent Advanced Technology 3.1A-1407-T2 and later


Monday, 11 Aug 2014


Customer may want to pass some custom information from WMI or PowerShell Management Script Rule to Argent Console Alerts

Customer can certainly embed the information in either Event summary or comment when calling method ‘FireEvent

But customer then needs some additional logic on Argent Console Alert side to parse and extract the string or numeric value

Customer can also attach the information to the Node variables, but the information may not be Node specific

The new feature is introduced in Argent AT 3.1A-1407-T2 and provides the most flexible way to pass custom information to Argent Console Alert

Following new methods are implemented in WMI Script Rule:

  • SetUserVar var_name, var_value
  • RemoveUserVar var_name
  • RemoveAllUserVars

The syntax and semantics are self-explanatory

When method ‘FireEvent‘ is called to fire an Event, all user variables that are set and not removed, are passed as variables to Argent Console Alert

To refer such variables in Email, SMS, SQL Alerts etc, customer can use keyword %AGVAR(“var_name”)%

The variable name is case-insensitive

Technical Background



Upgrade to Argent AT 3.1A-1407-T2 or later