For those interested, here's how you can achieve the same thing on 2003 Server. This uses a built in function called eventtriggers.exe.
If you run the below from a command prompt, you can get more info:
Firstly you need bmail.exe which you can download here. I already use this to e-mail NTBackup log files to my e-mail address daily (see next post).
Save this to C:\Windows\Backup
Create a new text file in C:\Windows\Backup called raidmessage.txt and insert the following, then save it:
Create a second text file in C:\Windows\Backup called trigger.bat and insert the following, then save it:
Server RAID Degraded on SERVERNAME @ SCHOOL
Open a command prompt and enter:
:: Name this script
:: Define message parameters
:: Define bmail parameters
:: EXELOCATION is the location of the BMAIL Executable.
set _SMTPSERVER=ENTER SMTP
set _TOADDR=ENTER YOUR E-MAIL ADDRESS
set _FROMADDR=ENTER FROM E-MAIL ADDRESS
set _SUBJECT="Server RAID %_SCRIPTNAME%"
:: Because of the formatting of the logfile, not all email programs render it properly.
:: Therefore we output the contents of the logfile to a plain ASCII text file.
type "%_LogLocation%" >> %_Text2Mail%
:: Send our email using the ASCII text file generated above as the message body.
%_EXELOCATION%\bmail -s %_SMTPSERVER% -t %_TOADDR% -f %_FROMADDR% -a %_SUBJECT% -m "%_Text2Mail%" -c
:: Delete our text file
You should see:
eventtriggers /create /eid 7202 /tr EventID7202 /ru ADMINISTRATOR /rp PASSWORD /tk C:\Windows\Backup\trigger.bat
If you wish to query it, enter:
SUCCESS: The event trigger "EventID7202" has been created.
You should see this:
Please note, I cannot take credit for all the code, but only some of it! I hope this helps you setup all kinds of other triggers!
Trigger ID Event Trigger Name Task
========== ========================= ========================================
1 EventID7202 C:\Windows\Backup\trigger.bat