Home » Scripts » Update Custom Fields in Ops Mgr 2007

Contoso.se

Welcome to contoso.se! My name is Anders Bengtsson and this is my blog about Azure infrastructure and system management. I am a senior engineer in the FastTrack for Azure team, part of Azure Engineering, at Microsoft.  Contoso.se has two main purposes, first as a platform to share information with the community and the second as a notebook for myself.

Everything you read here is my own personal opinion and any code is provided "AS-IS" with no warranties.

Anders Bengtsson

MVP
MVP awarded 2007,2008,2009,2010

My Books
Service Manager Unleashed
Service Manager Unleashed
Orchestrator Unleashed
Orchestrator 2012 Unleashed
OMS
Inside the Microsoft Operations Management Suite

Update Custom Fields in Ops Mgr 2007

I have built a script to update alert customfields in Ops Mgr 2007. I have done this for MOM 2005 too, more info here. In MOM 2005 I did it with a couple of rules. In Ops Mgr 2007 I solve it with a schedule task. My first idea was to run it as a command notification, but I ran into a permission issues. You can setup this script as a schedule task, and run it every X minute. It will load Ops Mgr command shell snap-in and then get all new alerts (ResolutionState = 0). The script wíll then get the computername from the alert and run some Active Directory queries based on that computername. The result from these queries will be input in the alert custom fields. Some alerts does not have a netbioscomputername attribute, therefor these alerts will not be updated, for example some Active Directory alerts.

You can customize the script any way you want. With this example I want to show you one way to do it, with some example attributes. Download the script here.

Custom Fields in Ops Mgr

1 Comment

Comments are closed.