Is it possible to trigger a script or command based on the IP address value in an event?

Article ID: 377
Category: General
Applies to: 2.93 and newer
Updated: 2018-03-30

Yes, in fact we have a [tutorial on our blog] that shows how to execute a command based on the IP value in certain Logon Failure events.

Please note that you can use a different event's data to get the IP address value for your script or command. You can use the [Event Message Browser] to determine the insertion string number of the IP address in that event. For example, if the event you choose has the IP address at insertion string 4, you would substitute $STR4 for the $STR20 item in the tutorial.

You can also execute any script or command with the IP as a parameter. For a very simple example, this would run an nslookup of the IP and save the result as a text file:
nslookup $STR20 > c:\temp\nslookup_result.txt