Use batch file to show notifications
Updated: 25 Jun 2010 | 1 comment
We recently installed SEPM 11 MR4 and are on the verge of going to production.
We would like to create SNMP traps in our monitoring system using a batch file, so we need to run a batch file when certain events occur (new risks, system info e.g.). SEPM has the possibility to run a batch file but how do i pass on additional information (source computer, event type e.g.) into my batch script?
Discussion Filed Under:
Comments
Hi: This is an old post
Hi: This is an old post but..
If you specify a batch file to run it's actually passed that information. I've actually talked to Symantec and they told me nothing was passed but I wrote a batch file below that indeed had the info displayed below in it:
@echo on
rem * ****************************************************************************
rem * * datatest.bat - simple script to see what was passed to us *
rem * ****************************************************************************
echo - %date% %time% We have been called! >> c:\temp\datatest.txt
echo We received %* >> c:\temp\datatest.txt
echo The tokens passed were - [%1] [%2] [%3] [%4] [%5] [%6] [%7] [%8] [%9] >> c:\temp\datatest.txt
Here is the result of the batch file text file after an eicar test:
- Wed 12/23/2009 12:55:41.59 We have been called!
We received "<Risk Name='EICAR Test String' File Path='C:\Stage\trigger.com' EventDateTime='2009-12-23 18:04:14 GMT' EventInsertTime='2009-12-23 18:10:10 GMT' User='johnnyb' Computer='COMPUTERNAME' IPAddress='IPADDRESS' Domain='Default' Server='CDV-SEPDEV' ClientGroup='My Company\DESKTOPS' ActualAction='19' />"
The tokens passed were - ["<Risk Name='EICAR Test String' File Path='C:\Stage\trigger.com' EventDateTime='2009-12-23 18:04:14 GMT' EventInsertTime='2009-12-23 18:10:10 GMT' User='johnnyb' Computer='COMPUTERNAME' IPAddress='IPADDRESSS' Domain='Default' Server='CDV-SEPDEV' ClientGroup='My Company\DESKTOPS' ActualAction='19' />"] [] [] [] [] [] [] [] []
Would you like to reply?
Login or Register to post your comment.