Updated: Enhanced SCOM Alerts Notification Emails script

I have previously posted the Enhanced SCOM Alerts Notification email scripts back in July 2010. I’d like to thank everyone who have tested it and provided feedbacks. You made me aware there are few issues and bugs with the script. Since I have just resigned and my new job won’t start in few weeks time, I have spent the last couple of days updating the script. This is what I’ve done: 1. Removed GetNetbiosName function Few people advised there are often this function running into errors.  I realised I originally wrote this function because one of my previous employers required

Continue reading

Balancing Number of SCOM Agent Per Management Server using PowerShell

I came across a situation yesterday in one of the clients SCOM environment: They currently have a single SCOM management group setup as the following: all SCOM management servers (including the root management server) are located on the same segment of the network. internal agents (from the same forest) are reporting to management server #1 and #2. External agents (from different forests) are reporting to management server #3 and #4 through firewall. SCOM is not integrated to AD – Therefore primary and failover management servers are not automatically assigned to agents. I needed to achieve: agents are evenly distributed to

Continue reading

ENHANCED SCOM Alerts Notification Emails!

17/08/2012: The version 2 of this script has just been released: http://blog.tyang.org/2012/08/16/scom-enhanced-email-notification-script-version-2/ 29/01/2012: The command notification channel setup section of this blog has been updated. More details of the change can be found HERE: http://blog.tyang.org/2012/01/29/command-line-parameters-for-scom-command-notification-channel/ Please Note: This post and associated script has been updated on 30/09/2010. Even though SCOM is a great product, I personally believe that alert notification emails is something that really needs improvements. It is very hard (and almost impossible – according to my standard) to configure a meaningful notification email using the variables SCOM provides. Most of times, the SCOM administrator would include a URL that takes

Continue reading

How To Write to SCOM Operations Manager Event Log Using PowerShell and MOM.ScriptAPI

The following commands can be executed using the normal PowerShell console. SCOM PowerShell snapin is not required. $momapi = New-Object -comObject "MOM.ScriptAPI" $momapi.LogScriptEvent("test",9999,2,"this is a test")   This is the log:   Detailed documentation of MOM.ScriptAPI can be found on MSDN.

Continue reading

Broken SCOM Web Console URLs?

I come across a situation where when i click on the web console URL from a SCOM notification email such as this one: http://<SCOM Web Server>/default.aspx?DisplayMode=Pivot&AlertID=%7b07aac5b0-4cf8-411f-b5a0-cb0075dc0f31%7d I get a HTTP 500 error: I had to change the URL from http://<SCOM Web Server>/default.aspx?DisplayMode=Pivot&AlertID=%7b07aac5b0-4cf8-411f-b5a0-cb0075dc0f31%7d to http://<SCOM Web Server>/default.aspx?DisplayMode=Pivot&AlertID={07aac5b0-4cf8-411f-b5a0-cb0075dc0f31} to make it work. It’s quiet painful as %7b and %7d comes as a part of SCOM WebConsole Link variable… For this particular environment, I found out it was caused by Forefront TMG server was blocking encoded URLs for this website. After unticking Verify normalization and Block high bit characters in the TMG rule, the

Continue reading

SCOM Console Crashes

When I connect SCOM console to one of my clients SCOM 2007 R2 environment, under Authoring Pane, if I change the display scope of Monitors or Rules to “View all target” and select everything: the console crashes. – Maybe there are too many objects for it to handle. After the crash, when I re-launch the console, I cannot go back into Authoring Pane. It crashes everytime I click on “Authoring”. To fix it so I can go back to Authoring Pane, I had to delete this registry key: HKEY_CURRENT_USER\Software\Microsoft\Microsoft Operations Manager\3.0\Console\Navigation\MonitoringConfigNavSettings\ScopedClasses I started the console again after the deletion and

Continue reading

Using SCOM to Automatically Stop MOM Agent Service

I’m currently working on a MOM 2005-to-SCOM 2007 migration project for a client. after months of work, we are finally ready to stop MOM service. We created a new GPO to set MOM service (MOM agent) to “Disabled” and linked to the top of the domain. we also wanted to make sure all MOM service are actually STOPPED on domain member servers AS WELL AS standalone SCOM agents. Traditionally, I’d create a package in SMS/SCCM with a script that firstly detect if SCOM agent service (HealthService) is running, and secondly, if so, stop MOM service. However, this particular client I’m currently

Continue reading
%d bloggers like this: