As a response to a alert we can run a script, what I tried here was how can I run and when I run how can I use the parameters of the alert if I need to do something and for that I just exported the data and wrote it to a file named alert .txt.
Screenshot and script
=================
Though Parameters to the script shoes only the target ID you can even insert the data of the alert as well.
Script
====
'====================
'testscript.vbs
'Description: This script writes the text passed as argument and in our case it is alert parameters
'This information can be used to do many things.
'====================
On Error Resume Next
Const ForWriting = 2
Const ForReading = 1
Const ForAppending = 8
Const TristateFalse = 0
Set fso = CreateObject("Scripting.FileSystemObject")
Set GObjArgs = WScript.Arguments
GStrCmd = GObjArgs(0)
Call crypt(GStrCmd)
Sub crypt(msg)
n = Len(msg)
set objArgs = WScript.Arguments
for each strArg in objArgs
msg = msg & strArg & “ “
next
output = msg
Set GObjLocalF = fso.OpenTextFile("c:\test\Test.txt",ForWriting,True)
GObjLocalF.WriteLine output
GObjLocalF.Close
End Sub