Scripting Token Library

Token Library

View a list of tokens to be used with scripting event monitors and notification actions. Tokens marked with * cannot be used with the PowerShell Event Monitor in legacy mode.

Tokens for the Device Being Monitored

Use the following tokens to refer to the device being monitored.

Token Definition
%%devicename%% Replaced with the device name of the device to be monitored
%%displayname%% Replaced with the display name of the device to be monitored
%%devicegroup%% Replaced with the name of the group that the device resides in
%%ipaddress%% The device's IP address
%%devicetag=TAG_NAME%% The name of a tag that is assigned to the device

Tokens for Event Monitor Performing Checks

The following tokens refer to the event monitor performing checks.

Token Definition
%%monitortag=TAG_NAME%% The tag value for TAG_NAME, tag must be assigned to the event monitor
%%script_timeout%% Time in seconds the script will be allowed to run before timing out

Authentication Profile for Event Monitor Performing Checks

If your event monitor has an authentication profile selected, those values will be used. If the event monitor is set to use the device's credentials, these tokens will use the values associated with the device.

Token Definition
%%username%% Authentication profile username
%%password%% Authentication profile password

Authentication Profiles for Microsoft Azure

When using the Microsoft Azure Credentials authentication profile type, use the following tokens:

Token Definition
%%tenantid%% or %%tenantdomain%% The tenant ID
%%subscriptionid%% The subscription ID

Authentication Profile Assigned to Device Being Monitored

For these tokens, the value for the device's authentication profile will be used. Use these tokens if you want to use the device's authentication credentials instead of those of the event monitor.

Token Definition
%%deviceusername%% Device username
%%devicepassword%% Device password

Azure/Intune Device Profiles

When using the Microsoft Azure Credentials authentication type, use the following tokens:

Token Definition
%%devicetenantid%% or %%devicetenantdomain%% The device tenant ID
%%devicesubscriptionid%% The device subscription ID

Authentication profiles for the site/remote node the event monitor runs in

If you want to use an authentication profile other than the one assigned to your device or monitor, use these tokens to specify an authentication profile associated with the site or remote node the event monitor runs in.

Token Definition
* %%username:PROFILE_NAME%% Auth profile username
* %%password:PROFILE_NAME%% Auth profile password

SNMP Profile of Device Being Monitored

Use the following tokens if you want to use the SNMP profile associated with the device you're monitoring.

Token Definition
* %%devicesnmpversion%% SNMP version (1, 2, or 3)
* %%devicesnmpcommunity%% SNMP community string

SNMPv3 Options for Profile Assigned to Device Being Checked

If you're using SNMPv3, the following tokens are available in addition to those above.

Token Definition
%%devicesnmpusername%% SNMP username
%%devicesnmpauthpassphrase%% SNMP authentication passphrase
%%devicesnmpprivacypassphrase%% SNMP privacy passphrase
%%devicesnmpauthprotocol%% SNMP authentication profile
%%devicesnmpcontext%% SNMP context
%%devicesnmpprivacyprotocol%% SNMP privacy protocol (DES or AES)
%%devicesnmpsecuritylevel%% SNMP security level (noAuthNoPriv, authNoPriv, or authPriv)

SNMP Profiles for the Site/Remote Node the Event Monitor Runs in

If you want to use an SNMP profile other than the one assigned to your device, use these tokens to specify a profile associated with the site or remote node the event monitor runs in.

Token Definition
* %%devicesnmpversion:PROFILE_NAME%% SNMP version (1, 2, or 3)
* %%devicesnmpcommunity:PROFILE_NAME%% SNMP community string

SNMPv3 Options for the Site/Remote Node the Event Monitor Runs in

The following are additional tokens you can use if running SNMPv3.

Token Definition
%%devicesnmpusername:PROFILE_NAME%% SNMP username
%%devicesnmpauthpassphrase:PROFILE_NAME%% SNMP authentication passphrase
%%devicesnmpprivacypassphrase:PROFILE_NAME%% SNMP privacy passphrase
%%devicesnmpauthprotocol:PROFILE_NAME%% SNMP authentication protocol (MD5, SHA, SHA-224,
SHA-2256, SHA-384, or SHA-512)
%%devicesnmpcontext:PROFILE_NAME%% SNMP context
%%devicesnmpprivacyprotocol:PROFILE_NAME%% SNMP privacy protocol (DES or AES)
%%devicesnmpsecuritylevel:PROFILE_NAME%% SNMP security level (noAuthNoPriv, authNoPriv, or authPriv)

Global Authentication Profiles

Some scripts must use a global authentication profile. The following are tokens you can use to designate one instead of entering these values directly into your scripts.

Token Definition
* %%username:global:PROFILE_NAME%% Global profile username
* %%password:global:PROFILE_NAME%% Global profile password

Global Authentication for Microsoft Azure Based Profiles

If your global profile is set to use Microsoft Azure Credentials, use the following tokens.

Token Definition
%%tenantid:global:PROFILE_NAME%% or %%tenantdomain:global:PROFILE_NAME%% Tenant ID
%%subscriptionid:global:PROFILE_NAME%% Subscription ID

Global SNMP Profiles

The following tokens can be used to designate global SNMP profiles.

Token Definition
* %%devicesnmpversion:global:PROFILE_NAME%% SNMP version (1, 2, or 3)
* %%devicesnmpcommunity:global:PROFILE_NAME%% SNMP community string

Global SNMPv3 Options

In addition to the above tokens, you can use the following if you're running SNMPv3.

Token Definition
%%devicesnmpusername:global:PROFILE_NAME%% SNMP username
%%devicesnmpauthpassphrase:global:PROFILE_NAME%% SNMP authentication passphrase
%%devicesnmpprivacypassphrase:global:PROFILE_NAME%% SNMP privacy passphrase
%%devicesnmpauthprotocol:global:PROFILE_NAME%% SNMP authentication protocol (MD5, SHA, SHA-224, SHA-2256,
SHA-384, or SHA-512)
%%devicesnmpcontext:global:PROFILE_NAME%% SNMP context
%%devicesnmpprivacyprotocol:global:PROFILE_NAME%% SNMP privacy protocol (DES or AES)
%%devicesnmpsecuritylevel:global:PROFILE_NAME%% SNMP security level (noAuthNoPriv, authNoPriv, or authPriv)

Formatting Tokens

Token Definition
%%CR%% Carriage return \r
%%LF%% Line feed \n
%%BACKSLASH%% \
%%QUOTE%% '
%%DOUBLEQUOTE%% "
*  %%TAB%% A tab \t

Back to Library