<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Using Resolution States to fine tune alert notifications</title>
	<atom:link href="http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/feed/" rel="self" type="application/rss+xml" />
	<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/</link>
	<description>Monitoring, Scripting, and other Technologies</description>
	<pubDate>Mon, 01 Dec 2008 23:03:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Steve Lee</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-73</link>
		<dc:creator>Steve Lee</dc:creator>
		<pubDate>Tue, 14 Oct 2008 19:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-73</guid>
		<description>Thanks Jeremy.  While I was teaching myself just enough PowerShell to get this done, I discovered mapping email addresses back to a resolution state with "switch" was a little much.  Here's the script I'm using now with small-scale success (most remarks removed):

#----
$resState = 0
$RMS = "yourrmshere"

Add-PSSnapin "Microsoft.EnterpriseManagement.OperationsManager.Client"
Set-Location "OperationsManagerMonitoring::"
New-ManagementGroupConnection -ConnectionString:$RMS
Set-Location $RMS

$momapi = New-Object -comObject "MOM.ScriptAPI"

# Gather all the alerts in ‘new’ state and with CustomField 10 in the range required
$alerts = Get-Alert &#124; Where-Object {$_.ResolutionState -eq 0 -and {$_.CustomField10 -gt 50 -and $_.CustomField10 -lt 200}}

# Now that we have our alerts, lets change the resolution state to equal the custom field.
foreach ($alert in $alerts) {
# Change resolution state
if ($alert.CustomField10 -gt 0 -and $alert.CustomField10 -lt 255)
{$alert.ResolutionState = $alert.CustomField10
# Update the RMS
$alert.Update("")}
}
#----

I've created several custom resolution states, like 52=Messaging Team, 53=Applications Team, etc..  Any custom rules or monitors beyond the Exchange MP can have CustomField10 set to 52, then a subscription filtered for the "Messaging Team" resolution state delivers only those alerts to them.  I think I can also use the severity flags to determine whether a subscription goes to pager, email, or just IM.

Thanks again for a great solution.</description>
		<content:encoded><![CDATA[<p>Thanks Jeremy.  While I was teaching myself just enough PowerShell to get this done, I discovered mapping email addresses back to a resolution state with &#8220;switch&#8221; was a little much.  Here&#8217;s the script I&#8217;m using now with small-scale success (most remarks removed):</p>
<p>#&#8212;-<br />
$resState = 0<br />
$RMS = &#8220;yourrmshere&#8221;</p>
<p>Add-PSSnapin &#8220;Microsoft.EnterpriseManagement.OperationsManager.Client&#8221;<br />
Set-Location &#8220;OperationsManagerMonitoring::&#8221;<br />
New-ManagementGroupConnection -ConnectionString:$RMS<br />
Set-Location $RMS</p>
<p>$momapi = New-Object -comObject &#8220;MOM.ScriptAPI&#8221;</p>
<p># Gather all the alerts in ‘new’ state and with CustomField 10 in the range required<br />
$alerts = Get-Alert | Where-Object {$_.ResolutionState -eq 0 -and {$_.CustomField10 -gt 50 -and $_.CustomField10 -lt 200}}</p>
<p># Now that we have our alerts, lets change the resolution state to equal the custom field.<br />
foreach ($alert in $alerts) {<br />
# Change resolution state<br />
if ($alert.CustomField10 -gt 0 -and $alert.CustomField10 -lt 255)<br />
{$alert.ResolutionState = $alert.CustomField10<br />
# Update the RMS<br />
$alert.Update(&#8221;")}<br />
}<br />
#&#8212;-</p>
<p>I&#8217;ve created several custom resolution states, like 52=Messaging Team, 53=Applications Team, etc..  Any custom rules or monitors beyond the Exchange MP can have CustomField10 set to 52, then a subscription filtered for the &#8220;Messaging Team&#8221; resolution state delivers only those alerts to them.  I think I can also use the severity flags to determine whether a subscription goes to pager, email, or just IM.</p>
<p>Thanks again for a great solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy D. Pavleck</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-72</link>
		<dc:creator>Jeremy D. Pavleck</dc:creator>
		<pubDate>Tue, 14 Oct 2008 13:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-72</guid>
		<description>Hey Steve,
 Using email addresses won't work so well, as it's not a simple matter to cause a notification to occur in response to an alert. A custom resolution state in a custom field would work well though - and a PS switch -match statement would be great. 
In fact I have an expanded script that matches alert names based on a switch statement, and it does great as long as there aren't a lot of alerts in the pipeline.</description>
		<content:encoded><![CDATA[<p>Hey Steve,<br />
 Using email addresses won&#8217;t work so well, as it&#8217;s not a simple matter to cause a notification to occur in response to an alert. A custom resolution state in a custom field would work well though - and a PS switch -match statement would be great.<br />
In fact I have an expanded script that matches alert names based on a switch statement, and it does great as long as there aren&#8217;t a lot of alerts in the pipeline.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Lee</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-71</link>
		<dc:creator>Steve Lee</dc:creator>
		<pubDate>Mon, 13 Oct 2008 15:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-71</guid>
		<description>I'm thinking of a twist on this that uses either email addresses or just the customized resolution state value in a Custom Field.  The script could grab the value in the Custom Field of your choice, and either change the resolution state to equal the Custom Field, or compare it to a lookup list (like a PS "switch" statement), then map the resolution state to a specific subscription.

Still trying to map it out in my head, and I'm not sure I know enough PowerShell to do it myself...  Does this sound feasible?</description>
		<content:encoded><![CDATA[<p>I&#8217;m thinking of a twist on this that uses either email addresses or just the customized resolution state value in a Custom Field.  The script could grab the value in the Custom Field of your choice, and either change the resolution state to equal the Custom Field, or compare it to a lookup list (like a PS &#8220;switch&#8221; statement), then map the resolution state to a specific subscription.</p>
<p>Still trying to map it out in my head, and I&#8217;m not sure I know enough PowerShell to do it myself&#8230;  Does this sound feasible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy D. Pavleck</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-43</link>
		<dc:creator>Jeremy D. Pavleck</dc:creator>
		<pubDate>Wed, 10 Sep 2008 20:24:12 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-43</guid>
		<description>bah! 5 mins, I'll fix this.



&#38;</description>
		<content:encoded><![CDATA[<p>bah! 5 mins, I&#8217;ll fix this.</p>
<p>&amp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy D. Pavleck</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-42</link>
		<dc:creator>Jeremy D. Pavleck</dc:creator>
		<pubDate>Wed, 10 Sep 2008 20:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-42</guid>
		<description>Ethan,
 If you look in the screenshot you can see what I mean, it's the HTML code for &#038;, which is &lt;pre&gt; &#38;&lt;/pre&gt; instead of &#038;</description>
		<content:encoded><![CDATA[<p>Ethan,<br />
 If you look in the screenshot you can see what I mean, it&#8217;s the HTML code for &#038;, which is
<pre> &amp;</pre>
<p> instead of &</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ethan Froese</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-41</link>
		<dc:creator>Ethan Froese</dc:creator>
		<pubDate>Wed, 10 Sep 2008 20:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-41</guid>
		<description>What does the following mean in your instructions? 

"Configure the command line execution settings as shown - remembering to use “&#38;” instead of “&#38;”."</description>
		<content:encoded><![CDATA[<p>What does the following mean in your instructions? </p>
<p>&#8220;Configure the command line execution settings as shown - remembering to use “&amp;” instead of “&amp;”.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy D. Pavleck</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-40</link>
		<dc:creator>Jeremy D. Pavleck</dc:creator>
		<pubDate>Wed, 10 Sep 2008 19:50:26 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-40</guid>
		<description>Hi John,
 That's a typo in the script regarding the resolution state. Should be $alert.ResolutionState = $resState, I'll have to fix that. One of the problems of testing something then trying to just edit it so you can publish it. 

I'm not quite understanding your question in your first post - except that the correction listed in the comments for #14 are correct, if you look at the screenshot you can see what I was trying to say. If you're having further questions, contact me at jeremy at pavleck dot net</description>
		<content:encoded><![CDATA[<p>Hi John,<br />
 That&#8217;s a typo in the script regarding the resolution state. Should be $alert.ResolutionState = $resState, I&#8217;ll have to fix that. One of the problems of testing something then trying to just edit it so you can publish it. </p>
<p>I&#8217;m not quite understanding your question in your first post - except that the correction listed in the comments for #14 are correct, if you look at the screenshot you can see what I was trying to say. If you&#8217;re having further questions, contact me at jeremy at pavleck dot net</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Bradshaw</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-39</link>
		<dc:creator>John Bradshaw</dc:creator>
		<pubDate>Wed, 10 Sep 2008 07:14:05 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-39</guid>
		<description>Hi,
Just one more Q....
Do the lines in the PS script have to agree in value (Below they both have a value of 10? So if I change the Alert Resolution state to 1, then both lines should be 1 in the script?
Thx
JB

$resState = 10 # Our custom resolution state

$alert.ResolutionState = 10</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Just one more Q&#8230;.<br />
Do the lines in the PS script have to agree in value (Below they both have a value of 10? So if I change the Alert Resolution state to 1, then both lines should be 1 in the script?<br />
Thx<br />
JB</p>
<p>$resState = 10 # Our custom resolution state</p>
<p>$alert.ResolutionState = 10</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Bradshaw</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-38</link>
		<dc:creator>John Bradshaw</dc:creator>
		<pubDate>Wed, 10 Sep 2008 06:24:18 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-38</guid>
		<description>Hi,
Thx for this. Looks good. 
I am still having trouble generating an e-mail alert from this. If I have a subscription to send an email on any windows 2003 server critical event, then I get an e-mail for this alert, but using the specific criterial listed above I receive no email alert, even though SCOM has registered the critical alert.
I did notice that someone queried a typo in Point 14 above. Is the line correct in the main body of the text above, or should it be amended?
Thx,
JB</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thx for this. Looks good.<br />
I am still having trouble generating an e-mail alert from this. If I have a subscription to send an email on any windows 2003 server critical event, then I get an e-mail for this alert, but using the specific criterial listed above I receive no email alert, even though SCOM has registered the critical alert.<br />
I did notice that someone queried a typo in Point 14 above. Is the line correct in the main body of the text above, or should it be amended?<br />
Thx,<br />
JB</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: System Center Forum - Tip: Four ways to target notifications to a more granular level OpsMgr and Essentials 2007</title>
		<link>http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/#comment-37</link>
		<dc:creator>System Center Forum - Tip: Four ways to target notifications to a more granular level OpsMgr and Essentials 2007</dc:creator>
		<pubDate>Tue, 09 Sep 2008 02:17:43 +0000</pubDate>
		<guid isPermaLink="false">http://pavleck.net/?p=61#comment-37</guid>
		<description>[...] As you will see, there&#8217;s a lot of flexibility in this method, although it takes some work. As Jeremy Pavleck mentions, you have 254 possible resolution states that can be used to in a Notification [...]</description>
		<content:encoded><![CDATA[<p>[...] As you will see, there&#8217;s a lot of flexibility in this method, although it takes some work. As Jeremy Pavleck mentions, you have 254 possible resolution states that can be used to in a Notification [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
