|
Mar 04
2009
|
SBS Backup Email Notification Trick!Posted by: Meraj Khalid on Mar 4, 2009 Tagged in: tips and tricks , servers
|
|
Now you can configure SBS email notification without enabling the SBS health monitoring feature in few simple steps.
Before starting this procedure you need to know why you are doing this:
If you configure default notifications in the Health Monitor of your SBS management console, every time you open or reboot the server, the successful alert will be sent too. So to avoid this situation you need to follow these few steps

In Small Business Server, event ID 5633 represents success and event ID 5634 represents failure.
Step 1: create a folder (ie. C:\rep) on your drive or where you want to create, then a new empty text file in that folder and rename it to 5633.vbs and edit the file using notepad to contain the following code:
‘Start code:
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "SBS Backup"
objMessage.From = "administrator@domain.com"
objMessage.To = "receiver@yourdomain.com"
objMessage.TextBody = "SBS Backup Succeeded"
objMessage.Send
'Code Finish
NOTE: Change the details in the code appropriate to your domain like in objMessage.from and obj.Message.To , and then save and close the file double click on it to check you able to get the email or not? Now we need to create failure event file in step 2
Step 2: Create a new empty text file in same folder that you created in the previous step and rename it to 5634.vbs and edit the file using notepad to contain the following code:
‘Start code
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "SBS Backup"
objMessage.From = "administrator@domain.com"
objMessage.To = "receiver@yourdomain.com"
objMessage.TextBody = "SBS Backup Failed"
objMessage.Send
'Code Finish
NOTE: Change the details in the code appropriate to your domain like in objMessage.from and obj.Message.To , and then save and close the file double click on it to check you able to get the email or not?
Step 3: open the command prompt from the start menu and have to write (it must be entered as a single line at the command prompt but you may see this as multiple lines in the posting) then press enter
eventtriggers /create /tr SBSBackupSuccess /eid 5633 /t INFORMATION /tk "c:\rep\5633.vbs" /ru "System"
After pressing enter again write
eventtriggers /create /tr SBSBackupfailure /eid 5634 /t INFORMATION /tk "c:\rep\5634.vbs" /ru "System"
Note: Make sure that the path to 5633.vbs and 5634.vbs files matches the path that you enter in the command prompt.
Done: now every time your backup finishes, it will automatically email you the result.
Troubleshooting relating to code: sometimes it won't run, don't blame me, check if the exchange server is not running on the same server. There should be an SMTP service install on the machine on which you are configuring. This triggers an event and maybe there is a change that stops you receiving email. In this case you need to enter this line of code after the first "'Start code" in your 5633.vbs and 5634.vbs code file which is as follows:
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.yourdomian.com"
This is fully tested and running.

written by pikko, May 05, 2009
written by qijjo, May 12, 2009





