SCOM 2012 SP1 - Automating alert ownsership with command channel notification: the command keeps executing

Hello everyone,

here is the context: one of my client wants that, when a SCOM operator changes the resolution state of an alert to a specific resolution state "XYZ", the alert's ownership is automatically set to this user's AD Account.

What I did:

  • a PoSh script that takes the alert ID as a parameter, extracts the user ID from the alert's history - get-scomalerthistory - and sets the alert's owner field with this ID - set-scomalert -owner.
  • a command channel running the script
  • a subscription that triggers for alert with the specific resolution state "XYZ"

It works great the first time - when the user sets the alert to XYZ state. Problems come right after this as it seems that modifying the alert in anyway - via GUI or script - will trigger the subscription once again.

So, in fact, I need the subscription to trigger only when the alert CHANGES its resolution state to XYZ.

Does anyone have an idea about this ?

Reagrds,

P. Augras

February 14th, 2014 5:14pm

Hi, it's predictable behavior as your script updates the alert property but alert property matches criteria specified. So one of methods is to change the resolution state in script to another state, something like XYZProcessed.
Free Windows Admin Tool Kit Click here and download it now
January 30th, 2015 3:35pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics