In MOM 2005 it was easy to notify someone on specific alerts. SCOM 2007 – with it’s subscription based system – cannot handle these kind of notifications. But the limitation is the user interface. Jakub from the SCOM 2007 product team released some very useful code which helped to implement a notification based on the alert name. One problem of Jakubs code is, that it’s a C# program which is not very handy and that he creates most of the stuff in code which can be created with the UI.
I translated the script to power shell, which should be much friendlier to use, deploy and let’s you quickly tweak some settings. The code below works for me (at least working with email notifications), but I have to admit, I didn’t test it that much. The script usage is pretty simple, but you have to do some stuff first:
- Setup email notification
- Create at least one recipient
- The alert has to be raised at least once
- Change the $RMS variable in the script to your root management server
Then, just execute it in Power Shell: “.C:Set-NotificationForAlert.ps1 “This is a test alert” “This is a test notification recipient”
Parameter 1: The name of the alert
Parameter 2: The name of the recipient
So, hopefully I can ease some pain with this…
Co-Founder and CEO of Royal Apps GmbH and Windows lead developer for Royal TS, a multi platform, multi protocol remote management solution, for Windows, macOS and mobile supporting RDP, VNC, SSH, Telnet, and many more.
Long time Microsoft MVP (2010-2020) supporting communities on- and offline as well as speaking at user groups and conferences about DevOps and other software development topics.