Operations Manager Mail Notification

A while back Tao over at http://blog.tyang.org release a nice PowerShell script to help create nice mail notifications for Operations Manager. Me and my good friend Mattias over at http://onelehmus.com/ found some things we wished where in the script and we also found an issue with the link to the web console.

Since then I also found this post https://blogs.msdn.microsoft.com/tysonpaul/2014/08/04/scom-enhanced-email-notification-script-version-2-1/ with a newer version of the same script but for some reason the formatting has been changed from the console look a like to a table based mail and I really like the initial formatting by Tao that makes the email look like the console information most of us are used to looking at.


For detailed information on how to set this up please visits Tao’s initial post here http://blog.tyang.org/2012/08/16/scom-enhanced-email-notification-script-version-2/

So here is what has been changed:

WebConsole Link

The web console link now only shows up if there is a web console installed and configured and looks like this taking you straight to the alert.


The web link is extracted from the SDK the same way other settings are gathered.

Knowledge article links

The next thing we wanted to change was that in several alerts knowledgebase articles there are links to external resources for further information or debugging. Since the rest of the mail is a HTML based email making those links clickable would be really nice.

This makes them look a bit like this.


Knowledge article language

As a last thing we added the option to specify which languages the knowledge article will appear in. You can the select the language code for the one you one or specify ALL to receive all available languages.

If you want all available languages the command line would then look something like this

PowerShell.exe -Command "& '"E:\Script\SCOMMail\SCOMEnhancedEmailNotification.ps1"'" -alertID '$Data/Context/DataItem/AlertId$' -Recipients @('HelpDesk;HelpDesk@viamonstra.com') –Languages ALL

If you want to specify the languages use the language code for each language you want to receive knowledge articles for like this

PowerShell.exe -Command "& '"E:\Script\SCOMMail\SCOMEnhancedEmailNotification.ps1"'" -alertID '$Data/Context/DataItem/AlertId$' -Recipients @('HelpDesk;HelpDesk@viamonstra.com') –Languages ENU


The script can be downloaded from here https://1drv.ms/f/s!ArAh2CEqOjRkkflr0QtNbAmOdF3uSQ

Hope this helps you get improve the information in your email alerts.



One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s