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