<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Kevin Holman's OpsMgr Blog : Authoring</title><link>http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx</link><description>Tags: Authoring</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Writing monitors to target Logical or Physical Disks</title><link>http://blogs.technet.com/kevinholman/archive/2009/11/24/writing-monitors-to-target-logical-or-physical-disks.aspx</link><pubDate>Tue, 24 Nov 2009 17:28:49 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3296102</guid><dc:creator>kevinhol</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3296102.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3296102</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3296102</wfw:comment><description>&lt;p&gt;This is something a LOT of people make mistakes on – so I wanted to write a post on the correct way to do this properly, using a very common target as an example.&lt;/p&gt;  &lt;p&gt;When we write a monitor for something like “Processor\% Processor Time\_Total” and target “Windows Server Operating System”…. everything is very simple.&amp;#160; “Windows Server Operating System” is a single instance target…. meaning there is only ONE “Operating System” instance per agent.&amp;#160; “Processor\% Processor Time\_Total” is also a single instance counter…. using ONLY the “_Total” instance for our measurement.&amp;#160; Therefore – your performance unit monitors for this example work just like you’d think.&lt;/p&gt;  &lt;p&gt;However – Logical Disk is very different.&amp;#160; On a given agent – there will often be MULTIPLE instances of “Logical Disk” per agent, such as C:, D:, E:, F:, etc…&amp;#160;&amp;#160; We must write our monitors to take this into account.&amp;#160; &lt;/p&gt;  &lt;p&gt;For this reason – we cannot monitor a Logical Disk perf counter, and use “Windows Server Operating System” as the target.&amp;#160; The only way this would work, is if we SPECIFICALLY chose the instance in perfmon.&amp;#160; I will explain:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Bad example #1:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I want to monitor for the perf counter Logical Disk\% Free Space\&amp;lt;All Instances&amp;gt; so that I can get an alert when any logical disk is below 50% in free space.&lt;/p&gt;  &lt;p&gt;I create a new monitor &amp;gt; unit monitor &amp;gt; Windows Performance Counters &amp;gt; Static Thresholds &amp;gt; Single Threshold &amp;gt; Simple Threshold.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb.png" width="288" height="168" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I target a generic class, such as “Windows Server Operating System”.&lt;/p&gt;  &lt;p&gt;I choose the perf counter I want – and select all instances:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_1.png" width="432" height="302" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And save my monitor.&lt;/p&gt;  &lt;p&gt;The problem with this workflow – is that we targeted a multi-instance perf counter, at a single instance target.&amp;#160; This workflow will load on all Windows Server Operating Systems, and parse through all discovered instances.&amp;#160; If an agent only has ONE instance of “Logical Disk” (C:) then this monitor will work perfectly…. if the C: drive does not have enough free space – no issues.&amp;#160; HOWEVER… if an agent has MULTIPLE instances of logical disks, C:, D:, E:, AND those disks have different threshold results… the monitor will “flip-flop” as it examines each instance of the counter.&amp;#160; For example, if C: is running out of space, but D: is not… the workflow will examine C:, turn red, generate an alert, then immediately examine D:, and turn back to green, closing the alert.&amp;#160; &lt;/p&gt;  &lt;p&gt;This is SERIOUS.&amp;#160; This will FLOOD your environment with statechanges, and alerts, every minute, from EVERY Operating System.&lt;/p&gt;  &lt;p&gt;A quick review of Health Explorer will show what is happening:&lt;/p&gt;  &lt;p&gt;This monitor went “unhealthy” and issued an alert at 10:20:58AM for the C: instance:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_3.png" width="430" height="242" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Then went “healthy” in the same SECOND from the _Total Instance:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_4.png" width="424" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Then flipped back to unhealthy, at the same time – for the D: instance.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_5.png" width="422" height="248" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;I think you can see how bad this is.&lt;/strong&gt;&amp;#160; I find this condition all the time, even in “mature” SCOM implementations… it just happens when someone creates a simple perf threshold monitor but doesn't understand the class model, or multi-instance perf counters.&amp;#160; In an environment with only 500 monitored agents –&lt;strong&gt; I can generate over 100,000 state changes – and 50,000 alerts, in an HOUR!!!!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ok – lesson learned – DONT target a single-instance class, using a multi-instance perf counter.&amp;#160; So – what should I have used?&amp;#160; Well, in this case – I should use something like “Windows 2008 Logical Disk”&amp;#160; But we can still screw that up!&amp;#160; :-)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Bad example #2:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I want to monitor for the perf counter Logical Disk\% Free Space\&amp;lt;All Instances&amp;gt; so that I can get an alert when any logical disk is below 20% in free space.&lt;/p&gt;  &lt;p&gt;I create a new monitor &amp;gt; Unit monitor &amp;gt; Windows Performance Counters &amp;gt; Static Thresholds &amp;gt; Single Threshold &amp;gt; Simple Threshold. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb.png" width="288" height="168" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I have learned from my mistake in Bad Example #1, so I target a more specific class, such as “Windows Server 2008 Logical Disk”.&lt;/p&gt;  &lt;p&gt;I choose the perf counter I want – and select all instances:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_1.png" width="432" height="302" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And save my monitor.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000" size="3"&gt;Ack!&amp;#160; The SAME problem!&amp;#160; Why????&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The problem is – now, instead of each Operating System instance loading this monitor, and then parsing and measuring each instance, now EACH INSTANCE of logical disk is doing the SAME THING.&amp;#160; This is actually WORSE than before…. because the number of monitors loaded is MUCH higher, and will flood me with even more state changes and alerts than before.&lt;/p&gt;  &lt;p&gt;Now if I look at Health Explorer – I will likely see MULTIPLE disks have gone red, and are “flip-flopping” and throwing alerts like never before.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_14.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_6.png" width="327" height="362" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When you dig into Health Explorer – you will see – that they are being turned Unhealthy – and it isn't event their drive letter!&amp;#160; I will examining the F: drive monitor:&lt;/p&gt;  &lt;p&gt;I can see it was turned unhealthy because of the free space threshold hit on the D: drive!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_16.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_7.png" width="425" height="214" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;and then flipped back to healthy due to the available space on the C: instance:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_18.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_8.png" width="426" height="221" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is very, very bad.&amp;#160; So – what are we supposed to do???&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We need to target the specific class (Windows 2008 Logical Disk) AND then use a Wildcard parameter, to match the INSTANCE name of the perf counter to the INSTANCE name of the “Logical Disk” object.&amp;#160; Make sense?&amp;#160; Such as – match up the “C:” perf counter instance – to the “C:” Device ID of the Logical Disk discovered in SCOM.&amp;#160; This is actually easier than it sounds:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Good example:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I want to monitor for the perf counter Logical Disk\% Free Space\&amp;lt;All Instances&amp;gt; so that I can get an alert when any logical disk is below 20% in free space.&lt;/p&gt;  &lt;p&gt;I create a new monitor &amp;gt; Unit monitor &amp;gt; Windows Performance Counters &amp;gt; Static Thresholds &amp;gt; Single Threshold &amp;gt; Simple Threshold. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb.png" width="288" height="168" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I have learned from my mistake in Bad Example #1, so I target a more specific class, such as “Windows Server 2008 Logical Disk”.&lt;/p&gt;  &lt;p&gt;I choose the perf counter I want – and INSTEAD of select all instances, I learn from my mistake in Bad Example #2.&amp;#160; Instead – this time I will UNCHECK the “All Instances” box, and use the “fly-out” on the right of the “Instance:” box:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_20.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_9.png" width="398" height="349" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This fly-out will present wildcard options, which are discovered properties of the Windows Server 2008 Logical Disk class.&amp;#160; You can see all of these if you viewed that class in discovered inventory.&amp;#160; What we need to do now – is use discovered inventory to find a property, that matches the perfmon instance name.&amp;#160; In perfmon – we see the instance names are “C:” or “D:”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_22.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_10.png" width="150" height="92" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In Discovered Inventory – looking at the Windows Server 2008 Logical Disk, I can see that “Device ID” is probably a good property to match on:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_26.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_12.png" width="490" height="231" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So – I choose “Device ID” from the fly-out, which inserts this parameter wildcard, so that the monitor on EACH DISK will ONLY examine the perf data from the INSTANCE in perfmon that matches the disk drive letter.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_24.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WritingmonitorstotargetLogicalorPhysical_FD76/image_thumb_11.png" width="471" height="305" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The wildcard parameter is actually something like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;$Target/Property[Type=&amp;quot;MicrosoftWindowsLibrary6172210!Microsoft.Windows.LogicalDevice&amp;quot;]/DeviceID$&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;This simply is a reference to the MP that defined the “Device ID” property on the class.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – no more flip-flopping, no more statechangeevent floods, no more alert storms opening and closing several times per second.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can use this same process for any multi-instance perf object.&amp;#160; I have a (slightly less verbose) example using SQL server &lt;a href="http://blogs.technet.com/kevinholman/archive/2007/12/14/how-do-i-collect-data-from-a-multi-instance-object-like-a-sql-db-instance.aspx"&gt;HERE&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To determine if you have already messed up…. you can look at “&lt;strong&gt;Top 20 Alerts in an Operational Database, by Alert Count&lt;/strong&gt;” and “&lt;strong&gt;Historical list of state changes by Monitor, by Day:&lt;/strong&gt;” which are available on my &lt;a href="http://blogs.technet.com/kevinholman/archive/2007/10/18/useful-operations-manager-2007-sql-queries.aspx"&gt;SQL Query List&lt;/a&gt;.&amp;#160; These should indicate lots of alerts, and monitor flip-flop, and should be investigated.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3296102" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>Making groups of logical disks – an example from simple to advanced</title><link>http://blogs.technet.com/kevinholman/archive/2009/11/05/making-groups-of-logical-disks-and-example-from-simple-to-advanced.aspx</link><pubDate>Thu, 05 Nov 2009 06:00:37 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3291597</guid><dc:creator>kevinhol</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3291597.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3291597</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3291597</wfw:comment><description>&lt;p&gt;I have been seeing this question come up a lot lately – as customers try and create groups of their disks – in order to create overrides for “certain” disks.&amp;#160; So – I am creating this post to give some real world examples.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well – I will start this simply.&amp;#160; Say we want to create a group of all logical disks, with the drive letters of C: and D:?&lt;/p&gt;  &lt;p&gt;I would start with creating a new group – and adding the “Windows Server 2003 Logical Disk” class.&amp;#160; Now – I could just use the parent class of “Logical Disk” instead of the OS specific class if I wanted.&amp;#160; The only issue with that is that most monitors targeting a disk – are OS specific – and duplicated three times.&amp;#160; So it is best to create specific groups for these – but totally not required.&lt;/p&gt;  &lt;p&gt;Ok – so in the Dynamic Members query builder – I click add, and pick a property.&amp;#160; Since I know “Device Name” contains the drive letter – this will do nicely.&amp;#160; I select device name “Equals” “C:”.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb.png" width="486" height="85" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – I want to also include D:.&amp;#160; There are many way to do – this – and I will go through them.&amp;#160; First – I could simply Insert a new line for Windows Server 2003 Logical Disk – and replicate the line I have – adding one for D:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_2.png" width="484" height="107" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Only one problem – this is an “AND” grouping – I really need this to be an “OR” grouping to include both C: and D: drives.&amp;#160; You can switch this grouping the in UI, just right click the word “AND” and change it to an OR grouping:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_3.png" width="313" height="140" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Voila!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_4.png" width="471" height="114" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This formula now looks like:&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;( Object is Windows Server 2003 Logical Disk AND ( Device Name Equals C: ) OR ( Device Name Equals D: ) )&lt;/strong&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Save your group – then right click it – and choose “View Group Members”.&amp;#160; This will ensure we are cooking with gas.&amp;#160; It should contain all your Windows 2003 based C: and D: volumes.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_5.png" width="447" height="145" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So far – so good.&lt;/p&gt;  &lt;p&gt;Now – what if I &lt;strong&gt;&lt;em&gt;ONLY&lt;/em&gt;&lt;/strong&gt; want C: and D: disks, that are &lt;strong&gt;&lt;em&gt;HOSTED&lt;/em&gt;&lt;/strong&gt; by specific Windows Computers?&amp;#160; I can do that too!&amp;#160; Lets say I want a group – of all the C: and D: logical disks, on servers that begin with the name “SR______”&lt;/p&gt;  &lt;p&gt;If you look at the bottom of the list of properties for Logical Disks – you will see (Host=Windows Computer).&amp;#160; From here – we can pick any attribute of the Windows Computer class as well to add to our expression – to limit our logical disks in our group to very specific Computers.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_16.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_6.png" width="684" height="406" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go back to the properties of your group, edit the Dynamic Members, and you can construct something like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_14.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_1.png" width="479" height="141" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Which translates to the following formula:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;( Object is Windows Server 2003 Logical Disk AND ( Windows Computer.NetBIOS Computer Name Matches wildcard sr* ) AND ( ( Device Name Equals C: ) OR ( Device Name Equals D: ) ) )&lt;/strong&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now – I will be honest – getting all the “ands” and “ors” in the right place using the UI is a big pain.&amp;#160; It is very easy to screw it up.&amp;#160; I like to simplify this to the fewest lines possible – using Regex.&lt;/p&gt;  &lt;p&gt;Using Regular Expressions – we can use modifiers to create very advanced expressions.&amp;#160; my favorites are ^ which means the beginning of a new line or word, and | which is the “pipe” symbol – which means “or”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So a simple way to accomplish the same example above – without all the complexity – is this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_18.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_7.png" width="481" height="94" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;WAY simpler!&lt;/p&gt;  &lt;p&gt;However – you might notice – this doesn't work right.&amp;#160; This is because Regex is case sensitive.&amp;#160; If the Server NetBIOS name is detected in all CAPS, this expression wont match.&amp;#160; I talk a little about this issue in this post:&amp;#160; &lt;a title="http://blogs.technet.com/kevinholman/archive/2009/04/21/quick-tip-using-regular-expressions-in-a-dynamic-group.aspx" href="http://blogs.technet.com/kevinholman/archive/2009/04/21/quick-tip-using-regular-expressions-in-a-dynamic-group.aspx"&gt;http://blogs.technet.com/kevinholman/archive/2009/04/21/quick-tip-using-regular-expressions-in-a-dynamic-group.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So – based on that posts example – there is a simple way to make a RegEx case insensitive:&amp;#160; (?i:blah)&lt;/p&gt;  &lt;p&gt;Using that as an example – we can now make very advanced groupings, quite easily:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_20.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_8.png" width="482" height="100" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(?i: to make it case insensitive.&amp;#160; ^ to signify the beginning of the word/line match.&amp;#160;&amp;#160; Here is the formula now:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;( Object is Windows Server 2003 Logical Disk AND ( Device Name Matches regular expression (?i:^C|^D) ) AND ( Windows Computer.NetBIOS Computer Name Matches regular expression (?i:^sr) ) )&lt;/strong&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Check it out:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_22.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_9.png" width="468" height="138" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Victory!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What if I wanted all logical disks that we NOT hosted by a Virtual Machine?&amp;#160; Easy!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_24.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_10.png" width="470" height="87" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;( Object is Logical Disk AND ( Windows Computer.Virtual Machine Equals False ) AND True )&lt;/strong&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;This reveals a group of ALL logical disks hosted by a Windows Computer with the attribute of Virtual Machine = False:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_26.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Makinggroupsoflogicaldiskstheeasyway_6CA1/image_thumb_11.png" width="453" height="408" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As you can see – using the Hosting relationship of the disk – to the Windows Computer object, there is much more you can do with groups.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3291597" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/management+pack/default.aspx">management pack</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/UI+Console/default.aspx">UI Console</category></item><item><title>What is config churn?</title><link>http://blogs.technet.com/kevinholman/archive/2009/10/05/what-is-config-churn.aspx</link><pubDate>Mon, 05 Oct 2009 08:29:49 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3284780</guid><dc:creator>kevinhol</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3284780.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3284780</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3284780</wfw:comment><description>&lt;p&gt;There have been a couple good articles briefly covering this topic…. you might have read them.&amp;#160; I will reference some below.&amp;#160; Config churn is basically, when your RMS is in an almost never-ending loop of generating config.&amp;#160; This can be caused by “less than optimized” management packs, pushing agents all the time, or injecting major changes into a management group, such as overrides or custom rules and monitors, or importing updated management packs.&amp;#160; By examining this topic in depth – we will re-state some already known best practices with maintaining a healthy management group, and get some deeper knowledge as to why they are best practices in the first place.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Any time you push agents, or create rules and monitors, or overrides for widespread classes….. you can create a config update on the RMS that must be sent down to ALL agents in the management group.&amp;#160; For small management groups (under 500 agents) this is generally not a big deal and processes rather quickly.&amp;#160; For large management groups over 1000 agents, this can cause high resource utilization of the RMS and SQL Database, in terms of CPU, Memory, and Disk I/O.&amp;#160; This can impact data insertion, and console performance during these times.&amp;#160; For these reasons, we like to keep those activities down to a minimum during working hours, and schedule these major changes in an off-hours maintenance window.&lt;/p&gt;  &lt;p&gt;What about “less than optimized” management packs?&amp;#160; What does that mean?&amp;#160; Well, this means management packs that you might be using, that have poorly written discoveries.&lt;/p&gt;  &lt;p&gt;We have long known that a worst practice in Management Pack development, is to have a discovery that discovers instances of a class, that has properties for those instances that are likely to change frequently.&amp;#160; Here is a write-up from OpsManJam on the topic:&amp;#160; &lt;a href="http://www.opsmanjam.com/Lists/General%20Discussion/DispForm.aspx?ID=2&amp;amp;RootFolder=/Lists/General%20Discussion/WORST%20PRACTICE%20Class%20properties%20that%20get%20updated%20frequently"&gt;LINK&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Ok… wait… &lt;em&gt;Whaaaaat&lt;/em&gt;?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Let me put that in English:&lt;/p&gt;  &lt;p&gt;Say we have a discovery for a Logical Disk.&amp;#160; This will discover any logical disk, like C:, D:, E:, Q:, etc….&amp;#160; When we write the discovery for a logical disk, we can add &lt;strong&gt;&lt;em&gt;properties&lt;/em&gt;&lt;/strong&gt; to that discovery.&amp;#160; These are attributes of the discovered instances.&amp;#160; So – in this case – lets say we decided to add “Size” of the disk as a property, and “Free Space” as a property.&amp;#160; And for the discovery frequency – we will run this discovery every hour, looking for new disks.&lt;/p&gt;  &lt;p&gt;“Size” is an excellent property for the Logical Disk class.&amp;#160; We like to know the size of the disks…. we can use this property group them if needed.&amp;#160; “Size” of a logical disk is not something that we would expect to change very often.&lt;/p&gt;  &lt;p&gt;“Free Space” is a horrible property for the Logical Disk class.&amp;#160; Free space is something that will likely change, just a small amount even, between each run of the discovery.&amp;#160; Free space is a property that is likely to change frequently, therefore – it should NOT be used in a discovery.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Make sense?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ok – so… what's the big deal?&lt;/p&gt;  &lt;p&gt;Well, the agent will run almost all discoveries that it knows about when the health service starts up (like when you bounce the service, or after a reboot).&amp;#160; It will always send this discovery data to the management server.&amp;#160; (this is another reason why &lt;a href="http://blogs.technet.com/kevinholman/archive/2009/03/26/are-your-agents-restarting-every-10-minutes-are-you-sure.aspx"&gt;agents restarting all the time&lt;/a&gt; is very bad)&amp;#160; Then, it will run then based on the “Interval” frequency specified on the discovery.&amp;#160; Sometimes this is as frequent as once per hour, sometimes as long as once per day.&amp;#160; When the discovery runs, the agent will inspect the discovery data that it gets, and compare it to the last discovery data it sent to the management server.&amp;#160; If nothing changed – the agent drops the discovery data and does nothing.&amp;#160; IF anything changed in the values of the discovery data – it will re-submit the new data to the management server, which will submit this data to the database.&amp;#160; The RMS will detect the change, and will have to recalculate (regenerate) configuration.&amp;#160; You will see this on the RMS as a 21025 event:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Log Name:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Operations Manager        &lt;br /&gt;Source:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OpsMgr Connector         &lt;br /&gt;Date:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 9/27/2009 11:51:49 PM         &lt;br /&gt;Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 21025         &lt;br /&gt;Task Category: None         &lt;br /&gt;Level:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Information         &lt;br /&gt;Keywords:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Classic         &lt;br /&gt;User:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; N/A         &lt;br /&gt;Computer:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OMRMS.opsmgr.net         &lt;br /&gt;Description:         &lt;br /&gt;OpsMgr has received new configuration for management group PROD1 from the Configuration Service.&amp;#160; The new state cookie is &amp;quot;D7 9B A4 BE 00 90 CF 13 35 B5 9B 5F 3B 14 FF 78 D6 13 9A 2D &amp;quot;&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The 21025 event isn’t really “bad”… it simply means the config service did its job.&amp;#160; It re-generated its configuration file from the database data, and wrote it to:&amp;#160; \Program Files\System Center Operations Manager 2007\Health Service State\Connector Configuration Cache\&amp;lt;MGNAME&amp;gt;\OpsMgrConnector.Config.xml&amp;#160; The problem is – when this config file gets large (like in large agent count environments) and when the “Config Instance Space” is large (number of discovered objects in total).&amp;#160; Recalculating this config can have a significant impact on the disk where the file exists on the RMS, use lots of memory and CPU on the RMS for the config service, and use significant disk I/O on the SQL database.&lt;/p&gt;  &lt;p&gt;If the RMS is in a perpetual cycle of recalculating config, and sending these config updates to all agents…. the performance of the management group is impacted.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://nocentdocent.wordpress.com/bloggers/daniele-grandini/"&gt;Daniele Grandini&lt;/a&gt; of &lt;a href="http://nocentdocent.wordpress.com/"&gt;Quaue Nocent Docent&lt;/a&gt; is pretty much the “godfather” of good information researching the 21025 event.&amp;#160; Read his 3 part series on config churn here:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://nocentdocent.wordpress.com/2009/07/09/troubleshooting-21025-events-wrap-up/" href="http://nocentdocent.wordpress.com/2009/07/09/troubleshooting-21025-events-wrap-up/"&gt;http://nocentdocent.wordpress.com/2009/07/09/troubleshooting-21025-events-wrap-up/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;So – what can I do if I think I have too much config churn?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The biggest problem causing the most frequent config updates is &lt;strong&gt;&lt;em&gt;management packs with noisy discoveries&lt;/em&gt;&lt;/strong&gt;.&amp;#160; However, lets wrap up all the issues that can cause it, and what you can do:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;New agents.&amp;#160; Discover/install/approve new agents in bulk and off-hours. &lt;/li&gt;    &lt;li&gt;Overrides.&amp;#160; Set overrides during off-hours, or create override MP’s in a lab, then synch to production management groups during schedule off-hours times. &lt;/li&gt;    &lt;li&gt;Custom rules and monitors.&amp;#160; Create these during off-hours, or create using the authoring console, test in a lab, then import to production during off-hours. &lt;/li&gt;    &lt;li&gt;Newly discovered instances.&amp;#160; For instance – someone adds a new disk, or SQL database, or DNS zone, to an existing agent.&amp;#160; Not much we can do about this, except the expectation that this would be done during off hours. &lt;/li&gt;    &lt;li&gt;Management packs with noisy discovery properties.&amp;#160; See below. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ok – the remainder of this article will touch on #5.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;How can I tell which discoveries are noisy?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Danilele Grandini has put together a good query on this, from his link:&amp;#160; &lt;a title="http://nocentdocent.wordpress.com/2009/05/23/how-to-get-noisy-discovery-rules/" href="http://nocentdocent.wordpress.com/2009/05/23/how-to-get-noisy-discovery-rules/"&gt;http://nocentdocent.wordpress.com/2009/05/23/how-to-get-noisy-discovery-rules/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I will repost these (slightly modified) below:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;/* Top Noisy Rules in the last 24 hours */ &lt;/p&gt;    &lt;p&gt;select ManagedEntityTypeSystemName, DiscoverySystemName, count(*) As 'Changes'      &lt;br /&gt;from       &lt;br /&gt;(select distinct       &lt;br /&gt;MP.ManagementPackSystemName,       &lt;br /&gt;MET.ManagedEntityTypeSystemName,       &lt;br /&gt;PropertySystemName,       &lt;br /&gt;D.DiscoverySystemName, D.DiscoveryDefaultName,       &lt;br /&gt;MET1.ManagedEntityTypeSystemName As 'TargetTypeSystemName', MET1.ManagedEntityTypeDefaultName 'TargetTypeDefaultName',       &lt;br /&gt;ME.Path, ME.Name,       &lt;br /&gt;C.OldValue, C.NewValue, C.ChangeDateTime       &lt;br /&gt;from dbo.vManagedEntityPropertyChange C       &lt;br /&gt;inner join dbo.vManagedEntity ME on ME.ManagedEntityRowId=C.ManagedEntityRowId       &lt;br /&gt;inner join dbo.vManagedEntityTypeProperty METP on METP.PropertyGuid=C.PropertyGuid       &lt;br /&gt;inner join dbo.vManagedEntityType MET on MET.ManagedEntityTypeRowId=ME.ManagedEntityTypeRowId       &lt;br /&gt;inner join dbo.vManagementPack MP on MP.ManagementPackRowId=MET.ManagementPackRowId       &lt;br /&gt;inner join dbo.vManagementPackVersion MPV on MPV.ManagementPackRowId=MP.ManagementPackRowId       &lt;br /&gt;left join dbo.vDiscoveryManagementPackVersion DMP on DMP.ManagementPackVersionRowId=MPV.ManagementPackVersionRowId       &lt;br /&gt;AND CAST(DefinitionXml.query('data(/Discovery/DiscoveryTypes/DiscoveryClass/@TypeID)') AS nvarchar(max)) like '%'+MET.ManagedEntityTypeSystemName+'%'       &lt;br /&gt;left join dbo.vManagedEntityType MET1 on MET1.ManagedEntityTypeRowId=DMP.TargetManagedEntityTypeRowId       &lt;br /&gt;left join dbo.vDiscovery D on D.DiscoveryRowId=DMP.DiscoveryRowId       &lt;br /&gt;where ChangeDateTime &amp;gt; dateadd(hh,-24,getutcdate())       &lt;br /&gt;) As #T       &lt;br /&gt;group by ManagedEntityTypeSystemName, DiscoverySystemName       &lt;br /&gt;order by count(*) DESC&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;and&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;/* Modified properties in the last 24 hours */&lt;/p&gt;    &lt;p&gt;select distinct      &lt;br /&gt;MP.ManagementPackSystemName,       &lt;br /&gt;MET.ManagedEntityTypeSystemName,       &lt;br /&gt;PropertySystemName,       &lt;br /&gt;D.DiscoverySystemName, D.DiscoveryDefaultName,       &lt;br /&gt;MET1.ManagedEntityTypeSystemName As 'TargetTypeSystemName', MET1.ManagedEntityTypeDefaultName 'TargetTypeDefaultName',       &lt;br /&gt;ME.Path, ME.Name,       &lt;br /&gt;C.OldValue, C.NewValue, C.ChangeDateTime       &lt;br /&gt;from dbo.vManagedEntityPropertyChange C       &lt;br /&gt;inner join dbo.vManagedEntity ME on ME.ManagedEntityRowId=C.ManagedEntityRowId       &lt;br /&gt;inner join dbo.vManagedEntityTypeProperty METP on METP.PropertyGuid=C.PropertyGuid       &lt;br /&gt;inner join dbo.vManagedEntityType MET on MET.ManagedEntityTypeRowId=ME.ManagedEntityTypeRowId       &lt;br /&gt;inner join dbo.vManagementPack MP on MP.ManagementPackRowId=MET.ManagementPackRowId       &lt;br /&gt;inner join dbo.vManagementPackVersion MPV on MPV.ManagementPackRowId=MP.ManagementPackRowId       &lt;br /&gt;left join dbo.vDiscoveryManagementPackVersion DMP on DMP.ManagementPackVersionRowId=MPV.ManagementPackVersionRowId       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; AND CAST(DefinitionXml.query('data(/Discovery/DiscoveryTypes/DiscoveryClass/@TypeID)') AS nvarchar(max)) like '%'+MET.ManagedEntityTypeSystemName+'%'       &lt;br /&gt;left join dbo.vManagedEntityType MET1 on MET1.ManagedEntityTypeRowId=DMP.TargetManagedEntityTypeRowId       &lt;br /&gt;left join dbo.vDiscovery D on D.DiscoveryRowId=DMP.DiscoveryRowId       &lt;br /&gt;where ChangeDateTime &amp;gt; dateadd(hh,-24,getutcdate())       &lt;br /&gt;ORDER BY MP.ManagementPackSystemName, MET.ManagedEntityTypeSystemName&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Wow – that returned a LOT of discoveries running all the time!&amp;#160; What can I do?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Don't import too many MP’s!&amp;#160; The FIRST line of defense – is NOT to import ANY management packs into a management group that you don't absolutely need RIGHT THEN.&amp;#160; Management packs are constantly updated, and by the time you have an actual SLA in a technology area – there will likely be a newer, better MP available for it.&amp;#160; The biggest mistake many customers make is to import any available MP for a technology that they have internally.&amp;#160; They end up with a FLOOD of alerts, big fat databases, slow consoles, and lots of weird errors.&amp;#160; MP’s should be transitioned slowly, one at a time – tuning and resolving as you go. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Disable the noisy discoveries.&amp;#160; Probably not a great solution, unless they discover objects that you really don't care about – but there are other objects in the MP that you DO want to monitor. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Increase the interval of the discovery frequency.&amp;#160; This means… essentially – change any “bad” discoveries to run only once per day.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Add a “synch time” override to the discovery – if possible.&amp;#160; This option is not available unless the MP author of the discovery exposed it.&amp;#160; What this will do – it cause all the agents to ONLY run the discovery at a distinct and specified time every day (say…. 1AM).&amp;#160; This might cause too much discovery data to flood in at one time… but since it will all come in at the same time – it wont cause constant config churn all throughout the day.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Re-write the discovery.&amp;#160; If this is a custom MP – rewrite the discovery/MP, and remove that property which changes too often.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Make sure your hardware and software is optimized for scalability.&amp;#160; On your RMS – it is good to place your config file on fast disks, especially in large environments.&amp;#160; I have worked with very large customers who were experiencing config churn, but had zero ill effects, because their RMS disk I/O was on a 4 spindle RAID10 with 15K spindles, CPU and memory were really good, and their SQL database disk I/O for the OpsDB was excellent with plenty of breathing room.&amp;#160; I have also worked with smaller agent counts, where config churn has a serious impact…. mostly due to the RMS config file being places on the same RAID spindle set as that OS and pagefile, using only 2 older 10,000 RPM disks.&amp;#160; The SQL disk I/O was also just borderline for their agent count.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Re-run the queries periodically – especially after importing/upgrading to a new management pack in your management group.&amp;#160; This “instance space change” report should be part of your testing and evaluation of a new MP when brought into your lab…. if you have a large agent count environment.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Some very common discoveries I have seen – that have properties that change very frequently – are listed below.&amp;#160; I often recommend these be overridden to run once per day (86,400 seconds)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="2" cellspacing="0" cellpadding="0" width="864"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td width="248"&gt;&lt;strong&gt;Discovery Display Name&lt;/strong&gt;&lt;/td&gt;        &lt;td width="166"&gt;&lt;strong&gt;Discovery Target Class&lt;/strong&gt;&lt;/td&gt;        &lt;td width="173"&gt;&lt;strong&gt;Discovered Type&lt;/strong&gt;&lt;/td&gt;        &lt;td width="135"&gt;&lt;strong&gt;Default frequency&lt;/strong&gt;&lt;/td&gt;        &lt;td width="138"&gt;&lt;strong&gt;Modified frequency&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="248"&gt;Discover File Groups and Files&lt;/td&gt;        &lt;td width="166"&gt;SQL 2005 DB Engine&lt;/td&gt;        &lt;td width="173"&gt;SQL 2005 DB File&lt;/td&gt;        &lt;td width="135"&gt;7260&lt;/td&gt;        &lt;td width="138"&gt;86400&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="248"&gt;Discover File Groups and Files&lt;/td&gt;        &lt;td width="166"&gt;SQL 2005 DB Engine&lt;/td&gt;        &lt;td width="173"&gt;SQL 2005 DB File Group&lt;/td&gt;        &lt;td width="135"&gt;7260&lt;/td&gt;        &lt;td width="138"&gt;86400&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="248"&gt;Discover SQL 2000 Databases&lt;/td&gt;        &lt;td width="166"&gt;SQL 2000 DB Engine&lt;/td&gt;        &lt;td width="173"&gt;SQL 2000 DB&lt;/td&gt;        &lt;td width="135"&gt;1800&lt;/td&gt;        &lt;td width="138"&gt;86400&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="248"&gt;Discover Databases for a Database Engine&lt;/td&gt;        &lt;td width="166"&gt;SQL 2005 DB Engine&lt;/td&gt;        &lt;td width="173"&gt;SQL 2005 DB&lt;/td&gt;        &lt;td width="135"&gt;7200&lt;/td&gt;        &lt;td width="138"&gt;86400&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="248"&gt;DNS 2003 Component Discovery&lt;/td&gt;        &lt;td width="166"&gt;DNS 2003 Server&lt;/td&gt;        &lt;td width="173"&gt;DNS 2003 Zone&lt;/td&gt;        &lt;td width="135"&gt;21600&lt;/td&gt;        &lt;td width="138"&gt;86400&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="248"&gt;DNS 2008 Component Discovery&lt;/td&gt;        &lt;td width="166"&gt;DNS 2008 Server&lt;/td&gt;        &lt;td width="173"&gt;DNS 2008 Zone&lt;/td&gt;        &lt;td width="135"&gt;21600&lt;/td&gt;        &lt;td width="138"&gt;86400&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="248"&gt;Windows Internet Information Services Base Classes Discovery Rule&lt;/td&gt;        &lt;td width="166"&gt;IIS 2003 Server Role&lt;/td&gt;        &lt;td width="173"&gt;IIS FTP Site&lt;/td&gt;        &lt;td width="135"&gt;3600&lt;/td&gt;        &lt;td width="138"&gt;86400&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="248"&gt;Windows Internet Information Services Base Classes Discovery Rule&lt;/td&gt;        &lt;td width="166"&gt;IIS 2000 Server Role&lt;/td&gt;        &lt;td width="173"&gt;IIS NNTP Virtual Server&lt;/td&gt;        &lt;td width="135"&gt;3600&lt;/td&gt;        &lt;td width="138"&gt;86400&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The above is just a sample – you should examine the query output of the query above and see what is impacting your management group the most.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3284780" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/management+pack/default.aspx">management pack</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/agents/default.aspx">agents</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>Alert Notification Subscription Variables, and linking that to the console, database, and SDK</title><link>http://blogs.technet.com/kevinholman/archive/2009/09/23/alert-notification-subscription-variables-and-linking-that-to-the-console-database-and-sdk.aspx</link><pubDate>Wed, 23 Sep 2009 20:54:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3282762</guid><dc:creator>kevinhol</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3282762.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3282762</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3282762</wfw:comment><description>&lt;P&gt;Attached you will find a spreadsheet, with all the possible alert notification subscription variables that I am aware of.&amp;nbsp; In this spreadsheet, I link these to the same values in the Alert table of the DB, the alert view of the DB, the Console alert view, the SDK (Get-Alert), and lastly the new R2 Connector Key pairs.&lt;/P&gt;
&lt;P&gt;My thought was to better understand each data property type of an alert, and what you can managed, from each area.&amp;nbsp; Hope this is beneficial.&lt;/P&gt;
&lt;P&gt;Most of these are listed at my other blog post on alert description and notification variables:&amp;nbsp; &lt;A title=http://blogs.technet.com/kevinholman/archive/2007/12/12/adding-custom-information-to-alert-descriptions-and-notifications.aspx href="http://blogs.technet.com/kevinholman/archive/2007/12/12/adding-custom-information-to-alert-descriptions-and-notifications.aspx" mce_href="http://blogs.technet.com/kevinholman/archive/2007/12/12/adding-custom-information-to-alert-descriptions-and-notifications.aspx"&gt;http://blogs.technet.com/kevinholman/archive/2007/12/12/adding-custom-information-to-alert-descriptions-and-notifications.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here is a sample shot of the spreadsheet tool:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AlertNotificationSubscriptionVariablesan_B58A/image_2.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AlertNotificationSubscriptionVariablesan_B58A/image_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AlertNotificationSubscriptionVariablesan_B58A/image_thumb.png" width=1028 height=330 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AlertNotificationSubscriptionVariablesan_B58A/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;See attached:&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3282762" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/kevinholman/attachment/3282762.ashx" length="16102" type="application/octet-stream" /><category domain="http://blogs.technet.com/kevinholman/archive/tags/Notification/default.aspx">Notification</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/connectors/default.aspx">connectors</category></item><item><title>Nice clean Alert descriptions have been added to R2. Ahem.</title><link>http://blogs.technet.com/kevinholman/archive/2009/08/04/nice-clean-alert-descriptions-have-been-added-to-r2-ahem.aspx</link><pubDate>Tue, 04 Aug 2009 09:14:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3270460</guid><dc:creator>kevinhol</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3270460.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3270460</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3270460</wfw:comment><description>&lt;p&gt;I didn't realize this feature got added – very nice.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In OpsMgr SP1 – we had to use some hacks to get the Alert Description formatted to be nicely readable.&amp;#160; I wrote about this &lt;a href="http://blogs.technet.com/kevinholman/archive/2008/07/01/are-your-alert-descriptions-ugly.aspx"&gt;HERE&lt;/a&gt;.&amp;#160; The problem was – we could add a &amp;lt;/BR&amp;gt; to the alert description and get this to work in SP1 – but in the email subscriptions – it was not formatted the same way and showed the &amp;lt;BR /&amp;gt; in text.&amp;#160; You you could have good readable emails or good readable alerts – but not both.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – in R2 – this is a much better story.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When authoring a rule against a test event, I can now hit “Enter” and start a new line, just like it should be:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_thumb.png" width="503" height="327" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the console, this now formats exceptionally well – as expected:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_thumb_1.png" width="295" height="182" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;However – the email is close – but not perfect.&amp;#160; This works most of the time as designed – but occasionally the email subscription does not pick up on the carriage returns.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_thumb_2.png" width="757" height="292" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Note the blobs in yellow above – this is where the Carriage Return did not get picked up. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;All is not lost!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;One trick – is that this might be caused by ending the line with a variable – as is my example.&amp;#160; What I did – was to simply end each variable statement with a real character – I simply added a “period” after each variable as shown:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_thumb_4.png" width="317" height="235" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Which now shows the email formatting as desired:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/NicecleanAlertdescriptionshavebeenadded_F87F/image_thumb_3.png" width="421" height="315" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The XML:&lt;/p&gt;  &lt;p&gt;What this does – behind the scenes – is adds the following to the Alert Message ID Display String:&amp;#160; (Basically – you can just add carriage returns in the XML and it will be picked up correctly in R2):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;MomUIGeneratedRule3407012ebced48c38440ed666eb0ae09.AlertMessage&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;Custom - Test alert on event 100 from rule&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Description&amp;gt;A test event occurred.    &lt;br /&gt;The Event ID is: {0}.    &lt;br /&gt;The Logging Computer is: {1}.    &lt;br /&gt;The Event Source is: {2}.    &lt;br /&gt;The Event Level is: {3}. &lt;/p&gt;  &lt;p&gt;Event Description = {4}&amp;lt;/Description&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What do the {numbers} mean?&amp;#160; Those are alert parameters.&amp;#160; It gets those from the Alert params section in the Rule XML:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;lt;WriteAction ID=&amp;quot;Alert&amp;quot; TypeID=&amp;quot;Health!System.Health.GenerateAlert&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160; &amp;lt;Priority&amp;gt;2&amp;lt;/Priority&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Severity&amp;gt;2&amp;lt;/Severity&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;AlertOwner /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;AlertMessageId&amp;gt;$MPElement[Name=&amp;quot;MomUIGeneratedRule3407012ebced48c38440ed666eb0ae09.AlertMessage&amp;quot;]$&amp;lt;/AlertMessageId&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;AlertParameters&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertParameter1&amp;gt;$Data/EventNumber$&amp;lt;/AlertParameter1&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertParameter2&amp;gt;$Data/LoggingComputer$&amp;lt;/AlertParameter2&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertParameter3&amp;gt;$Data/EventSourceName$&amp;lt;/AlertParameter3&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertParameter4&amp;gt;$Data/EventLevel$&amp;lt;/AlertParameter4&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertParameter5&amp;gt;$Data/EventDescription$&amp;lt;/AlertParameter5&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/AlertParameters&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Suppression /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom1 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom2 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom3 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom4 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom5 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom6 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom7 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom8 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom9 /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Custom10 /&amp;gt;    &lt;br /&gt;&amp;lt;/WriteAction&amp;gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3270460" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/R2/default.aspx">R2</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/UI+Console/default.aspx">UI Console</category></item><item><title>Using the Probe Based Script Event Rule – or – how to used a script to create events in the workflow</title><link>http://blogs.technet.com/kevinholman/archive/2009/07/28/using-the-probe-based-script-event-rule-or-how-to-used-a-script-to-create-events-in-the-workflow.aspx</link><pubDate>Tue, 28 Jul 2009 02:44:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3268518</guid><dc:creator>kevinhol</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3268518.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3268518</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3268518</wfw:comment><description>&lt;P&gt;So – in my &lt;A href="http://blogs.technet.com/kevinholman/archive/2009/07/22/101-using-custom-scripts-to-write-events-to-the-opsmgr-event-log-with-momscriptapi-logscriptevent.aspx" mce_href="http://blogs.technet.com/kevinholman/archive/2009/07/22/101-using-custom-scripts-to-write-events-to-the-opsmgr-event-log-with-momscriptapi-logscriptevent.aspx"&gt;previous post&lt;/A&gt; on the basics of MOMScriptAPI.LogScriptEvent, we talked about how to take your own script – and log an event to the OperationsManager Windows Event Log.&lt;/P&gt;
&lt;P&gt;One of the challenges with this – is that it will not allow us to add multiple parameters to the event.&amp;nbsp; Using the Probe Based Script Event rule – we can do this…. it is just a bit more complicated.&amp;nbsp; I haven't seen any good examples out there on the basics of authoring this type of rule – so here goes.&lt;/P&gt;
&lt;P&gt;For starters – I am going to create this rule in the intended fashion – it is an Event Collection rule by nature.&amp;nbsp; So, I will run the most simple of scripts, on a schedule, and collect the event based output.&amp;nbsp; Then, in the more advanced scenario – I will edit the rule, to add an alert write action – which will be able to pull rich event data into the alert description, or custom fields.&lt;/P&gt;
&lt;P&gt;Let’s get started.&lt;/P&gt;
&lt;P&gt;Create the rule for a Test MP in your lab.&amp;nbsp; We will be using the Authoring Console to write this rule.&amp;nbsp; If you aren't familiar with the Authoring console yet – you need to get more familiar with it – and this is an excellent chance to get accustomed to the Auth Console for a very simple rule type like this.&amp;nbsp; We “could” make this basic rule in the OpsMgr UI, Authoring tab – but all the advanced functions we need are in the authoring console:&lt;/P&gt;
&lt;P&gt;Start up the Authoring console.&amp;nbsp; Choose File, New, Empty Management Pack.&amp;nbsp; Give it an Identity (I will use Custom.Script.Test.MP)&amp;nbsp; Then give the MP a disaply name – which you will see in the console once imported.&amp;nbsp; Use your documented custom MP naming standard here.&amp;nbsp; I will use “Custom – Script Test MP”&lt;/P&gt;
&lt;P&gt;In the Auth Console – choose the Health Model tab.&amp;nbsp; Click Rules.&amp;nbsp; Right click in the open space on the right, and choose New &amp;gt; Collection &amp;gt; Event Based &amp;gt; Script Based Event Collection.&amp;nbsp; Here is what pops up:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_18.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_18.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_8.png" width=549 height=332 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In the Element ID – this is prefaced my the MP ID, then “NewElement”.&amp;nbsp; So – we need to change “NewElement” to something meaningful… basically – something that represents this rule name.&amp;nbsp; I will use “Custom.Script.Test.MP.CustomRuleTestScript”&amp;nbsp; (This field does not allow spaces)&lt;/P&gt;
&lt;P&gt;In the Display Name – this is what will show up in the console UI for the Rule Name – so name this according to your documented custom Rule naming standards.&amp;nbsp; I will use “Custom – Script Event Rule” (This field does allow spaces)&lt;/P&gt;
&lt;P&gt;For the target – I will be using my favorite generic target - “Windows Server Operating System”.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_20.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_20.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_9.png" width=369 height=400 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Set the Rule Category to “EventCollection”.&amp;nbsp;&amp;nbsp;&amp;nbsp; Here is how it looks filled out:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_22.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_22.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_10.png" width=541 height=322 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;For testing – we will run this rule every 1 minutes:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_6.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_6.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_2.png" width=272 height=164 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Give the script a name – I used TestScript.vbs.&amp;nbsp; Set the TimeOut to 30 seconds (needs to be less than the interval, which in this case was every 60 seconds).&lt;/P&gt;
&lt;P&gt;Paste in a sample script:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_8.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_8.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_3.png" width=544 height=405 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The script above is very simple – it does not do anything fancy – it simply runs, and submits PropertyBags in the form of Event information, which the Event Workflox in XML can consume, and collect.&amp;nbsp; We are only submitting three items in this basic example – Event ID, and two custom EventParameters.&lt;/P&gt;
&lt;P&gt;If we wanted to test this script – to make sure it works correctly – just run it on a test machine with a SCOM agent installed – and examine the output:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;C:\bin\scripts&amp;gt;cscript.exe /nologo TestScript1.vbs&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;lt;DataItem type="System.PropertyBagData" time="2009-07-27T11:58:39.4154203-05:00" sourceHealthServiceId="2B5A37C8-DB0A-7CAE-DB0E-451EA34FA250"&amp;gt;&amp;lt;Property Name="EventID" VariantType="2"&amp;gt;10&amp;lt;/Property&amp;gt;&amp;lt;Property Name="EventParam1" VariantType="8"&amp;gt;SomeText1&amp;lt;/Property&amp;gt;&amp;lt;Property Name="EventParam2" VariantType="8"&amp;gt;SomeText2&amp;lt;/Property&amp;gt;&amp;lt;/DataItem&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is the expected output above.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Next – on the Event Mapping screen&lt;/STRONG&gt;… we need to fill in variables – or hard coded information we want in our script.&lt;/P&gt;
&lt;P&gt;For the Computer field – we will use a Windows Computer property, to place the NetBIOS name of the Windows Computer hosting this Operating System, into the event.&amp;nbsp; Click the browse button at the right – and choose Target, then (Host=Windows Computer), then NetBIOS Computer Name.&amp;nbsp; It should look something like this:&amp;nbsp; $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$&lt;/P&gt;
&lt;P&gt;For the Event Source and Event Log, those are our own custom source and log – since this isn't a real Windows Event… so I will use “MyCustomEventSource” and “MyCustomScriptEventLog” for examples here.&amp;nbsp; You can use anything you like.&lt;/P&gt;
&lt;P&gt;Leave EventID at the default variable.&lt;/P&gt;
&lt;P&gt;I will be using Category = 1, and setting Level = Error:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_12.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_12.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_5.png" width=731 height=256 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now – create the rule, and then save the MP.&lt;/P&gt;
&lt;P&gt;If we imported this simple MP into our lab management group - what we should should see – is that OpsMgr is collecting this event in the database every minute, for our test machine.&amp;nbsp; Create a view in MyWorkspace for event ID 10:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_14.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_14.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_6.png" width=697 height=187 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Notice the event details:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_16.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_16.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_7.png" width=402 height=374 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This is pretty basic.&amp;nbsp; Lets examine the XML for our rule:&amp;nbsp; I highlighted in blue and bold, all the stuff we just did in the UI – so you can see where it matches up:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Rule ID="&lt;FONT color=#0000ff&gt;&lt;STRONG&gt;Custom.Script.Test.MP.CustomRuleTestScript&lt;/STRONG&gt;&lt;/FONT&gt;" Enabled="true" Target="Windows!&lt;FONT color=#0000ff&gt;&lt;STRONG&gt;Microsoft.Windows.Server.OperatingSystem&lt;/STRONG&gt;&lt;/FONT&gt;" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Category&amp;gt;&lt;FONT color=#0000ff&gt;&lt;STRONG&gt;EventCollection&lt;/STRONG&gt;&lt;/FONT&gt;&amp;lt;/Category&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DataSources&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.EventProvider"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;IntervalSeconds&amp;gt;&lt;STRONG&gt;&lt;FONT color=#0000ff&gt;60&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/IntervalSeconds&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SyncTime /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ScriptName&amp;gt;&lt;FONT color=#0000ff&gt;&lt;STRONG&gt;TestScript.vbs&lt;/STRONG&gt;&lt;/FONT&gt;&amp;lt;/ScriptName&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Arguments /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ScriptBody&amp;gt;&amp;lt;![CDATA[&lt;STRONG&gt;&lt;FONT color=#0000ff&gt;Dim oAPI, oBag &lt;BR&gt;Set oAPI = CreateObject("MOM.ScriptAPI") &lt;BR&gt;Set oBag = oAPI.CreatePropertyBag() &lt;BR&gt;Call oBag.AddValue("EventID",10) &lt;BR&gt;Call oBag.AddValue("EventParam1","SomeText1") &lt;BR&gt;Call oBag.AddValue("EventParam2","SomeText2") &lt;BR&gt;Call oAPI.Return(oBag)&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;&amp;lt;/ScriptBody&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;&amp;lt;TimeoutSeconds&amp;gt;30&amp;lt;/TimeoutSeconds&amp;gt; &lt;BR&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EventOriginId&amp;gt;$MPElement$&amp;lt;/EventOriginId&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PublisherId&amp;gt;$MPElement$&amp;lt;/PublisherId&amp;gt; &lt;BR&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PublisherName&amp;gt;MyCustomEventSource&amp;lt;/PublisherName&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Channel&amp;gt;MyCustomScriptEventLog&amp;lt;/Channel&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LoggingComputer&amp;gt;$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$&amp;lt;/LoggingComputer&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EventNumber&amp;gt;$Data/Property[@Name='EventID']$&amp;lt;/EventNumber&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EventCategory&amp;gt;1&amp;lt;/EventCategory&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EventLevel&amp;gt;1&amp;lt;/EventLevel&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;UserName /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Params /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DataSource&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DataSources&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WriteActions&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectEvent" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishEventData" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/WriteActions&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Rule&amp;gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above is very simple – a rule, using the built-in TimedScript.EventProvider Data source, which runs a script every 60 seconds, and submits some PropertyBags as event data.&lt;/P&gt;
&lt;P&gt;TimeoutSeconds was configured on the Script page in the UI.&lt;/P&gt;
&lt;P&gt;EventOriginId and PublisherId will be left at defaults.&lt;/P&gt;
&lt;P&gt;PublisherName = “Event source” in the UI.&lt;/P&gt;
&lt;P&gt;Channel = “Event log” in the UI.&lt;/P&gt;
&lt;P&gt;EventNumber = “Event ID” in the UI.&lt;/P&gt;
&lt;P&gt;EventCategory = “Category” in the UI.&lt;/P&gt;
&lt;P&gt;EventLevel = “Level” in the UI.&amp;nbsp; (0=Success, 1=Error, 2=Warning, 4=Information)&lt;/P&gt;
&lt;P&gt;UserName, Description, and Params are not exposed in the UI – but can be filled in by variable output of your custom script for advanced scenarios, or you could hard code these in your XML if needed.&lt;/P&gt;
&lt;P&gt;Ok – done with the simple stuff……&amp;nbsp;&amp;nbsp; :-)&lt;/P&gt;
&lt;P&gt;Now – what if we don't want to COLLECT the event – we want to ALERT, if this event is created as an option of our script?&amp;nbsp; Well – we can do that – just not in the regular Console UI.&amp;nbsp; We need to edit the &amp;lt;WriteActions&amp;gt; part of the XML, along with several other parts of XML – OR – we can add this very simply in the Authoring Console. &lt;/P&gt;
&lt;P&gt;So – back to the Authoring console.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Right click the custom rule we just created – and choose Properties.&lt;/P&gt;
&lt;P&gt;Select the Modules Tab.&lt;/P&gt;
&lt;P&gt;In the Actions area – click the Create button.&lt;/P&gt;
&lt;P&gt;Scroll down – and highlight the System.Health.GenerateAlert.&amp;nbsp; For “Module ID” – type in “Alert” and click OK (see graphic)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_24.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_24.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_11.png" width=466 height=230 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_11.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Back on the Modules Tab – Highlight “Alert” under Actions, and click the Edit button.&lt;/P&gt;
&lt;P&gt;On the pop-up – click “Configure”&lt;/P&gt;
&lt;P&gt;Now you can fill out the details on this familiar screen.&amp;nbsp; Give it a good Alert Name.&amp;nbsp; Set the Priority and Severity as desired.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_26.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_26.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_12.png" width=554 height=467 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_12.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Click Alert Suppression, and suppress duplicate alerts based on your choosing.&amp;nbsp; I will use Event ID, and Logging Computer.&lt;/P&gt;
&lt;P&gt;Click OK several times to accept these changes, and then save your MP.&lt;/P&gt;
&lt;P&gt;At this point – you can import the MP and it works as designed…. you will run the script – create the script based event data, collect the event in the OpsMgr database, and then also – generate an Alert each time the script runs, based on the event data.&amp;nbsp; Here is an example of the alert generate:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_28.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_28.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_13.png" width=538 height=363 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_13.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now – lets make the alert richer.&amp;nbsp; The whole point of this exercise was to be able to add multiple parameters as variables to the Alert – for instance – to be able to add them as Custom Fields in the alert.&lt;/P&gt;
&lt;P&gt;In order to do this – we need to add a few things to the rule:&lt;/P&gt;
&lt;P&gt;First – we need to add the Parameter to the data source:&lt;/P&gt;
&lt;P&gt;In the Authoring Console – right click the rule and choose properties.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Select the Modules tab.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Highlight the Data Source and click Edit.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Click Configure.&lt;/P&gt;
&lt;P&gt;Go to the Event Mapper Tab, and click the “Parameters” button.&amp;nbsp; We will past in the following parameters – separated by a SPACE:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;$Data/Property[@Name='EventParam1']$ $Data/Property[@Name='EventParam2']$&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;These are the parameters directly from our script:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;STRONG&gt;Call oBag.AddValue("EventParam1","SomeText1") &lt;BR&gt;Call oBag.AddValue("EventParam2","SomeText2")&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This will allow our Alert workflow to call these parameter variables – and place the resolved text into the Alert description or custom fields.&lt;/P&gt;
&lt;P&gt;Lets do that!&amp;nbsp; &lt;/P&gt;
&lt;P&gt;In the Authoring Console - on the Modules tab of the custom rule, highlight the Alert Action, and click Edit.&lt;/P&gt;
&lt;P&gt;Click the Configure button.&lt;/P&gt;
&lt;P&gt;Add the parameter variables to the Alert Description field, and Custom Field 8 and Custom Field 9.&amp;nbsp; These should be in the syntax of:&lt;/P&gt;
&lt;P&gt;$Data/Params/Param[1]$ &lt;/P&gt;
&lt;P&gt;$Data/Params/Param[2]$&amp;nbsp; &lt;/P&gt;
&lt;P&gt;etc…. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_30.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_30.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_14.png" width=272 height=102 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_14.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_32.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_32.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_15.png" width=571 height=360 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_15.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Click OK on the screens to save your changes, save, and import your test MP.&lt;/P&gt;
&lt;P&gt;The alerts will now have richer data available – with the alert description and custom fields now populated with your custom script based event parameters:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_34.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_34.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_16.png" width=566 height=174 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_16.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_36.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_36.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_17.png" width=622 height=145 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingtheProbeBasedScriptEventRuleorhowto_C889/image_thumb_17.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below – you will find my final XML attached (with the rule disabled so it wont flood your environment should you import it)&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3268518" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/kevinholman/attachment/3268518.ashx" length="1586" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>101: Using custom scripts to write events to the OpsMgr Event Log with MOMScriptAPI.LogScriptEvent</title><link>http://blogs.technet.com/kevinholman/archive/2009/07/22/101-using-custom-scripts-to-write-events-to-the-opsmgr-event-log-with-momscriptapi-logscriptevent.aspx</link><pubDate>Wed, 22 Jul 2009 08:15:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3266980</guid><dc:creator>kevinhol</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3266980.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3266980</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3266980</wfw:comment><description>&lt;p&gt;This is very basic 101 stuff.&amp;#160; I provide some links to some much deeper articles.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When converting MOM 2005 scripts…. on of the common things to do is to change the way events are written.&lt;/p&gt;  &lt;p&gt;In MOM 2005, we would most commonly use a custom method, ScriptContext.CreateEvent, which would create custom events via script in the MOM channel, that other event workflows could pick up on (Script Generated Data Source).&lt;/p&gt;  &lt;p&gt;Alternatively – we would use the native VBscript methods to write a generic event to the application event log.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;A GREAT write-up on this whole process – breaking it down step by step is located here:&lt;/p&gt;  &lt;p&gt;Updating MOM 2005 Scripts for Operations Manager 2007:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.systemcentercentral.com/Downloads/DownloadsDetails/tabid/144/IndexID/7608/Default.aspx" href="http://www.systemcentercentral.com/Downloads/DownloadsDetails/tabid/144/IndexID/7608/Default.aspx"&gt;http://www.systemcentercentral.com/Downloads/DownloadsDetails/tabid/144/IndexID/7608/Default.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This MOM 2005 method has been deprecated in OpsMgr 2007.&amp;#160; It still is possible to utilize via converted MOM 2005 MP’s… but the best practice is to convert these to native SCOM scripts, and use the MOMScriptAPI.LogScriptEvent method, which will write a real event to the OperationsManager event log.&amp;#160; You will see many Microsoft MP’s do this… such as the ADMP, DHCP, and Exchange MP’s, even the core test scripts.&amp;#160; Here are some examples:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Event Type:&amp;#160;&amp;#160;&amp;#160; Information       &lt;br /&gt;Event Source:&amp;#160;&amp;#160;&amp;#160; Health Service Script        &lt;br /&gt;Event Category:&amp;#160;&amp;#160;&amp;#160; None        &lt;br /&gt;Event ID:&amp;#160;&amp;#160;&amp;#160; 6022        &lt;br /&gt;Date:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7/21/2009        &lt;br /&gt;Time:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 8:00:03 PM        &lt;br /&gt;User:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; N/A        &lt;br /&gt;Computer:&amp;#160;&amp;#160;&amp;#160; EX07A        &lt;br /&gt;Description:        &lt;br /&gt;LogEndToEndEvent.js : This event is logged to the Windows Event Log periodically to test a event collection. &lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Event Type:&amp;#160;&amp;#160;&amp;#160; Information       &lt;br /&gt;Event Source:&amp;#160;&amp;#160;&amp;#160; Health Service Script        &lt;br /&gt;Event Category:&amp;#160;&amp;#160;&amp;#160; None        &lt;br /&gt;Event ID:&amp;#160;&amp;#160;&amp;#160; 19960        &lt;br /&gt;Date:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7/21/2009        &lt;br /&gt;Time:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 11:06:30 PM        &lt;br /&gt;User:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; N/A        &lt;br /&gt;Computer:&amp;#160;&amp;#160;&amp;#160; EXCH1        &lt;br /&gt;Description:        &lt;br /&gt;Check service(s) state : All specified services are running. List of specified services: MSExchangeIS, MSExchangeMGMT, MSExchangeMTA, MSExchangeSA, SMTPSVC, W3SVC &lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Event Type:&amp;#160;&amp;#160;&amp;#160; Information       &lt;br /&gt;Event Source:&amp;#160;&amp;#160;&amp;#160; Health Service Script        &lt;br /&gt;Event Category:&amp;#160;&amp;#160;&amp;#160; None        &lt;br /&gt;Event ID:&amp;#160;&amp;#160;&amp;#160; 1112        &lt;br /&gt;Date:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7/21/2009        &lt;br /&gt;Time:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7:51:34 PM        &lt;br /&gt;User:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; N/A        &lt;br /&gt;Computer:&amp;#160;&amp;#160;&amp;#160; DC01        &lt;br /&gt;Description:        &lt;br /&gt;DHCP2003ComponentDiscovery.vbs : Discovery of DHCP components started. Portion 1 &lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The MOMScriptAPI.LogScriptEvent method is documented here:&amp;#160; &lt;a title="http://msdn.microsoft.com/en-us/library/bb437630.aspx" href="http://msdn.microsoft.com/en-us/library/bb437630.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb437630.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To start – I am just going to write a timed event rule, which will run a script that will create a simple event every minute – using the sample provided at the link above.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;New Rule &amp;gt; Timed Commands &amp;gt; Execute a Script&lt;/p&gt;  &lt;p&gt;Give it a Rule name according to your documented Rule naming standard.&amp;#160; I will target my favorite generic target - “Windows Server Operating System”.&lt;/p&gt;  &lt;p&gt;Set it to run every 60 seconds (only for testing in a lab!!!)&lt;/p&gt;  &lt;p&gt;For the File Name – I am using LogScriptEvent.vbs, set the timeout to 30 seconds (less than the interval!) and paste in the sample script:&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre&gt;Option Explicit
Dim oAPI, oArgs
Set oAPI = CreateObject(&amp;quot;MOM.ScriptAPI&amp;quot;)
Set oArgs = WScript.Arguments

' Check to see if the required script arguments are there.
' In this example, at least three arguments are required.
' If the arguments do not exist, log a script event.
If oArgs.Count &amp;lt;3 Then
    ' If the script is called without the required arguments,
    ' create an information event and then quit.
    Call oAPI.LogScriptEvent(&amp;quot;LogScriptEvent.vbs&amp;quot;, 101, 0, &amp;quot;LogScriptEvent script was called with fewer than three arguments and was not executed.&amp;quot;)
    WScript.Quit -1
End If

' When it passes the required arguments check satisfactorily, the
' remaining script, located here, is run.&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;All this script does – is log an error – if there not at least 3 arguments (script parameters) passed to the script – it logs an error in the OpsMgr event log.&lt;/p&gt;

&lt;p&gt;Create it, and here is what I start seeing every minute in my OpsMgr event log:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Log Name:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Operations Manager
      &lt;br /&gt;Source:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Health Service Script

      &lt;br /&gt;Date:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7/21/2009 11:32:15 PM

      &lt;br /&gt;Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 101

      &lt;br /&gt;Task Category:&amp;#160;&amp;#160; None

      &lt;br /&gt;Level:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Information

      &lt;br /&gt;Keywords:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Classic

      &lt;br /&gt;User:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; N/A

      &lt;br /&gt;Computer:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OMTERM.opsmgr.net

      &lt;br /&gt;Description:

      &lt;br /&gt;LogScriptEvent.vbs : LogScriptEvent script was called with fewer than three arguments and was not executed.&lt;/strong&gt;

    &lt;br /&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So – it works very simply.&amp;#160; See the link above for what you can customize with this.&amp;#160; Now – any custom VBscript you like – you can take the output of those scripts, and log events using OpsMgr.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;What is even cooler… is testing your SCOM scripts is easier than ever… you can simply run them on any machine that has an OpsMgr agent installed.&amp;#160; If they submit data – such as propertybags, you will see those in the command window.&amp;#160; If they log events – they will log the event immediately in the OpsMgr event log.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Here is another very simple script… which will take the script parameters as arguments, and log them in the event description:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Option Explicit
    &lt;br /&gt;Dim oAPI, oArgs

    &lt;br /&gt;Set oAPI = CreateObject(&amp;quot;MOM.ScriptAPI&amp;quot;)

    &lt;br /&gt;Set oArgs = WScript.Arguments &lt;/p&gt;

  &lt;p&gt;Call oAPI.LogScriptEvent(&amp;quot;LogScriptEventArgs.vbs&amp;quot;, 102, 2, oArgs(0) &amp;amp; &amp;quot; &amp;quot; &amp;amp; oArgs(1) &amp;amp; &amp;quot; &amp;quot; &amp;amp; oArgs(2))
    &lt;br /&gt;&amp;#160;&amp;#160; WScript.Quit -1&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you call the script – you must pass parameters to the script:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;cscript.exe LogScriptEventArgs.vbs scriptparam1 scriptparam2 scriptparam3&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This creates the following event:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Log Name:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Operations Manager
      &lt;br /&gt;Source:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Health Service Script

      &lt;br /&gt;Date:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7/22/2009 12:07:09 AM

      &lt;br /&gt;Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 102

      &lt;br /&gt;Task Category:&amp;#160;&amp;#160;&amp;#160; None

      &lt;br /&gt;Level:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Warning

      &lt;br /&gt;Keywords:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Classic

      &lt;br /&gt;User:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; N/A

      &lt;br /&gt;Computer:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OMTERM.opsmgr.net

      &lt;br /&gt;Description:

      &lt;br /&gt;LogScriptEventArgs.vbs : scriptparam1 scriptparam2 scriptparam3&lt;/strong&gt;

    &lt;br /&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are a few things we would LIKE to have with this – but don't:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;1.&amp;#160; We cannot change the Event Source… it is hard coded to “Health Service Script”&lt;/p&gt;

&lt;p&gt;2.&amp;#160; We cannot have event parameters in the event description.&amp;#160; This method is hard coded to 2 event parameters.&amp;#160; The script Name is Params/Param[1], and the “&lt;em&gt;bstrDescription&lt;/em&gt;” string value is a single parameter, Params/Param[2]

  &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Still – this method is very useful, when your complex VBScripts have multiple possible outputs… you can use the LogScriptEvent method to log distinct events, and then have other rules and monitors alert, or respond to, those custom events.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3266980" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>Using a Generic Text Log rule to monitor an ASCII text file – even when the file is a UNC path</title><link>http://blogs.technet.com/kevinholman/archive/2009/06/20/using-a-generic-text-log-rule-to-monitor-an-ascii-text-file-even-when-the-file-is-a-unc-path.aspx</link><pubDate>Sat, 20 Jun 2009 02:23:11 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3256945</guid><dc:creator>kevinhol</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3256945.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3256945</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3256945</wfw:comment><description>&lt;p&gt;There are several examples in blogs on how to create a generic text log rule to monitor for a local text file (Unicode, ASCII, or UTF8).&lt;/p&gt;  &lt;p&gt;This will be a step-by-step example of doing the same, however, using this to monitor the log file on a remote UNC path instead of a local drive.&amp;#160; This is useful when we want to monitor a file/files on a NAS or an a share that is hosted by a computer without an agent.&lt;/p&gt;  &lt;p&gt;This is a bit unique… instead of applying this rule to ALL systems that might have a specific logfile present in a specific directly – we are going to target this rule to only ONE agent.&amp;#160; This agent will monitor the remote fileshare similar to the concept of a “Watcher Node” for a synthetic transaction.&amp;#160; Therefore we will be creating this rule disabled, and enabling it only for our “Watcher”. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the Ops console – select the Authoring pane &amp;gt; Rules.&amp;#160; &lt;/p&gt;  &lt;p&gt;Right click Rules, and select Create a new rule.&amp;#160; We will chose the Generic Text Log for this example:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_thumb.png" width="261" height="204" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Choose the appropriate MP to save this new customer rule to, and click Next.&lt;/p&gt;  &lt;p&gt;For this rule name – I will be using “Company Name – Monitor remote logfile rule”&lt;/p&gt;  &lt;p&gt;Set the Rule Category to “Alert”&lt;/p&gt;  &lt;p&gt;For the target – I like to use “Windows Server Operating System” for generic rules and monitors.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;UNCHECK&lt;/em&gt;&lt;/strong&gt; the box for “Rule is enabled”&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_thumb_1.png" width="555" height="461" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Click Next.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The directory will be the UNC path.&amp;#160; Mine is “\\VS2\Software\Temp”&lt;/p&gt;  &lt;p&gt;The pattern will be the logfile(s) you want to monitor.&amp;#160; We can use a specific file, such as “logfile.log” or a wildcard, such as “*.log”.&lt;/p&gt;  &lt;p&gt;You should &lt;strong&gt;&lt;em&gt;not&lt;/em&gt;&lt;/strong&gt; check the “UTF8” box unless you know the logfile to be UTF8 encoded.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_thumb_2.png" width="492" height="412" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Click Next.&lt;/p&gt;  &lt;p&gt;On the event expression, click Insert for a new line.&amp;#160; Essentially – log file monitors look at each new line in a logfile as one object to read, and this is represented by “&lt;strong&gt;Params/Param[1]&lt;/strong&gt;”&amp;#160; This “Parameter 1” is the entire line in the logfile, and is the &lt;strong&gt;&lt;em&gt;only&lt;/em&gt;&lt;/strong&gt; value that is valid for this type of monitor – so just type/paste that in the box for Parameter Name.&lt;/p&gt;  &lt;p&gt;Since we want to search the logfile line for a specific word, the Operator will be “Contains”.&lt;/p&gt;  &lt;p&gt;For the value – this can be the word you are looking for in the line, that you want to alert on.&amp;#160; For my example, I will use the word “failed”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_thumb_3.png" width="531" height="162" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Click Next.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;On the alert screen – we can customize the alert name if desired, set the severity and priority, and build a better Alert Description.&amp;#160; If you are using SP1 – the default alert description is blank.&amp;#160; If you are using R2 – the default alert description is “Event Description: $Data/EventDescription$”&amp;#160; HOWEVER – this is an invalid event variable for this type of event (logfile)…. so we need to change that right away.&amp;#160; I keep a list of common alert description strings &lt;a href="http://blogs.technet.com/kevinholman/archive/2007/12/12/adding-custom-information-to-alert-descriptions-and-notifications.aspx"&gt;HERE&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For this – I will recommend the following alert description.&amp;#160; Feel free to customize to make good sense out of your alert:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Logfile Directory : $Data/EventData/DataItem/LogFileDirectory$        &lt;br /&gt;Logfile name: $Data/EventData/DataItem/LogFileName$         &lt;br /&gt;String:&amp;#160; $Data/EventData/DataItem/Params/Param[1]$&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Click “Create” to create the rule.&lt;/p&gt;  &lt;p&gt;Find the rule you just created in the console – right click it and choose “Properties”.&amp;#160; On the Configuration tab, under responses (to the right of “Alert”) click Edit.&lt;/p&gt;  &lt;p&gt;Click the “Alert Suppression” button.&amp;#160; You should consider adding in alert suppression on specific fields of an alert – in order to suppress a single alert for each match in the logfile.&amp;#160; If you don't – should the monitored logfile ever get flooded with lines containing “failed” from the application writing the log – SCOM will generate one alert for each line written to the log.&amp;#160; This has the potential to flood the SCOM database/Console with alerts.&amp;#160; By setting alert suppression here – we will create one alert, and increment the repeat count for each subsequent line/alert.&amp;#160; I am going to suppress on LoggingComputer and Parameter 1 for this example:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_thumb_4.png" width="178" height="295" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Click OK several times to accept and save these changes to the rule.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – we created this rule as disabled – so we need to enable it via an override.&amp;#160; I will find the rule in the console – and override the rule &lt;strong&gt;&lt;em&gt;“For a specific object of class:&amp;#160; Windows Server Operating System”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_thumb_5.png" width="715" height="253" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – pick one of these machines to be the “watcher” for the logfile in the remote share.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;**Note&lt;/strong&gt; – the default agent action account will make the connection to the share and read the file.&amp;#160; In my case – the default agent action account is “Local System” so this will be the domain computer account of the “Watcher” agent which connects to the remote share and reads the file.&amp;#160; This account will need access to the share, folder, and files monitored.&amp;#160; Keep that in mind.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Set the override to “Enabled = True” and click OK.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;At this point, our Watcher machine will download the management pack again with the newly created override, and apply the new config.&amp;#160; Once that is complete – it will begin monitoring this file.&amp;#160; You can create a log file in the share path, and then write a new line with the word “failed” in it.&amp;#160; You need a carriage return after writing the line for SCOM to pick up on the change.&lt;/p&gt;  &lt;p&gt;You should see a new alert pop in the console, based on matching the criteria.&amp;#160; Subsequent log file matches will only increment the repeat count.&amp;#160; Customize the alert suppression as it makes sense for you.&lt;/p&gt;  &lt;p&gt;Then – create additional rules just like this – for different UNC paths.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_14.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/UsingaGenericTextLogruletomonitoranASCII_1028B/image_thumb_6.png" width="564" height="252" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3256945" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>Web Application recorder R2 – the recorder bar missing in IE?</title><link>http://blogs.technet.com/kevinholman/archive/2009/06/19/web-application-recorder-r2-the-recorder-bar-missing-in-ie.aspx</link><pubDate>Fri, 19 Jun 2009 18:15:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3256792</guid><dc:creator>kevinhol</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3256792.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3256792</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3256792</wfw:comment><description>&lt;p&gt;Sometimes getting the web application recorder to capture a web session can be a little tricky.&amp;#160; I have blogged about some typical issues you might run into &lt;a href="http://blogs.technet.com/kevinholman/archive/2008/11/15/recording-a-web-application-browser-session-driving-you-crazy.aspx"&gt;HERE&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Something I noticed today, with R2:&lt;/p&gt;  &lt;p&gt;When running the R2 console on an x64 machine – the web recorder bar is not coming up.&amp;#160; &lt;/p&gt;  &lt;p&gt;On my x86 machine – it was working just fine, however.&amp;#160; I notice – when I go into IE settings, Tools, Manage Add-ons….. I see this on a working machine:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WebApplicationrecorderR2therecorderbarmi_9043/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/WebApplicationrecorderR2therecorderbarmi_9043/image_thumb.png" width="801" height="344" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;However – these add-ons are missing on my x64 based consoles.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The problem turned out to be…. that when you install the console on an x64 machine, it registers the x64 version of these add-ons.&amp;#160; However – the IE browser launched by default by hitting “Start Capture”, is the x86 version.&amp;#160; You have to manually launch the x64 IE shortcut – in order to use the web recorder browser.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So here are some steps to make this work:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1.&amp;#160; Open the web application editor&lt;/p&gt;  &lt;p&gt;2.&amp;#160; Hit “Start Capture”&lt;/p&gt;  &lt;p&gt;3.&amp;#160; This will launch Internet Explorer in 32 bit mode.&amp;#160; Close this browser.&lt;/p&gt;  &lt;p&gt;4.&amp;#160; From the start menu, run Internet Explorer (64-bit)&lt;/p&gt;  &lt;p&gt;5.&amp;#160; The web recorder will appear.&amp;#160; (If not – choose View &amp;gt; Explorer Bars &amp;gt; Web Recorder)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;From there you can record your session, hit stop, and it will populate the web application tool as normal.&amp;#160; Just a minor inconvenience of closing one browser, and opening another.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3256792" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/R2/default.aspx">R2</category></item><item><title>Creating custom dynamic computer groups based on registry keys on agents</title><link>http://blogs.technet.com/kevinholman/archive/2009/06/10/creating-custom-dynamic-computer-groups-based-on-registry-keys-on-agents.aspx</link><pubDate>Wed, 10 Jun 2009 07:09:48 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3252822</guid><dc:creator>kevinhol</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3252822.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3252822</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3252822</wfw:comment><description>&lt;p&gt;I have had a few requests now for this, so I thought I would take the time to write up the process.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_30.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_14.png" width="527" height="389" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Lets say I have three support levels of servers:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Level 1&lt;/strong&gt; – servers critical to business operations (ex: customer facing web applications, SQL back-ends)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Level&lt;/strong&gt; &lt;strong&gt;2&lt;/strong&gt; – important servers (ex: messaging, internal apps)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Level 3&lt;/strong&gt; – non-essential servers (ex: non-critical or highly redundant internal apps)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Lets say we want to create overrides for certain rules…&amp;#160; where we will page on anything in Level 1 group, email notify on Level 2 group, and simply alert for Level 3.&amp;#160; Possibly we want to create views, and only see alerts for Level 1 servers.&amp;#160; Perhaps we wish to scope users so they only see Level 1 and Level 2 servers in the console?&lt;/p&gt;  &lt;p&gt;Well – the first step is to place these servers into groups.&lt;/p&gt;  &lt;p&gt;Sure – we can do this manually, with explicit assignments to the group.&amp;#160; But that is resource intensive over time, and we might miss one down the road.&amp;#160; I’d prefer to dynamically create the groups of Windows Computers based on a name…. but this can be difficult sometimes – where we don't have a solid naming scheme, or other criteria to group by.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I will demonstrate another way to accomplish this… by coming up with a business process to use a registry key on your managed servers, and collect this registry attribute with SCOM.&amp;#160; Then – use this Registry attribute for dynamic group memberships.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Ultimately – there are three simple steps to this process:&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;1.&amp;#160; Create registry keys on agents.&lt;/p&gt;    &lt;p&gt;2.&amp;#160; Extended a class with an attribute, to discover the registry keys and values.&lt;/p&gt;    &lt;p&gt;3.&amp;#160; Create dynamic groups based on the attribute values from the registry.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;It is just that simple.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To get started – lets talk about our custom registry key.&amp;#160; For this example, I am going to create a new Key at HKLM\Software\ and call it “CompanyName”&lt;/p&gt;  &lt;p&gt;Next – in that key – I will create a new DWORD Value, named “SupportLevel”&lt;/p&gt;  &lt;p&gt;Lastly – I will assign a numeric value to “SupportLevel” on each server, either 1, 2, or 3.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb.png" width="599" height="408" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In my environment…. my Hyper-V servers are critical.&amp;#160; They host all of my VM’s, including many business critical applications.&amp;#160; Therefore – they will get Level 1.&lt;/p&gt;  &lt;p&gt;My Exchange 2007 servers handle all my mail traffic and notifications, so I will set their registry value to Level 2.&lt;/p&gt;  &lt;p&gt;My Exchange 2003 servers have been retired – for MP testing only… so we will set those to Level 3.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Here is a table that shows what I am planning:&lt;/strong&gt;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="199"&gt;&lt;strong&gt;ServerName&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="199"&gt;&lt;strong&gt;SupportLevel&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;VS1&lt;/td&gt;        &lt;td valign="top" width="199"&gt;1&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;VS2&lt;/td&gt;        &lt;td valign="top" width="199"&gt;1&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;VS3&lt;/td&gt;        &lt;td valign="top" width="199"&gt;1&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;EX1CLN1&lt;/td&gt;        &lt;td valign="top" width="199"&gt;2&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;EX1CLN2&lt;/td&gt;        &lt;td valign="top" width="199"&gt;2&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;EXCAS&lt;/td&gt;        &lt;td valign="top" width="199"&gt;2&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;EX2CLN1&lt;/td&gt;        &lt;td valign="top" width="199"&gt;3&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;EX2CLN2&lt;/td&gt;        &lt;td valign="top" width="199"&gt;3&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="199"&gt;OWA&lt;/td&gt;        &lt;td valign="top" width="199"&gt;3&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So – I get all my registry values set on all computers.&amp;#160; This is a big job at first, but it is a one time deal, and you can even script it if you are handy.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Next… we need to discover these registry entries in SCOM, as attributes of a class.&amp;#160; Then were can use that attribute to group objects.&amp;#160; Since I want Windows Computer objects in my groups (Windows Computer is a good object for most overrides, scoping, notifications…etc..) we would like to have these attributes added to the Windows Computer class.&lt;/p&gt;  &lt;p&gt;However – there is a problem.&amp;#160; The Windows Computer object is in a sealed MP.&amp;#160; We cannot just add information to that class as we would like.&amp;#160; Therefore – OpsMgr allows us to “Extend” an existing class… and add our custom attributes to it.&amp;#160; This “Extended” class is basically a copy of the existing class… it will have all the built in attributes of Windows Computer, and will also have our custom attribute properties.&amp;#160; It’s is easier to see it than to talk about it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;First – in the Ops console – authoring pane – go to Attributes.&amp;#160; Create a new attribute.&amp;#160; I am going to call this one “SupportLevel”&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_1.png" width="681" height="598" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Next – choose “Registry” for the discovery type.&lt;/p&gt;  &lt;p&gt;Next – We need to pick the Target class.&amp;#160; We want Windows Computer.&amp;#160; Note – this will create a new class, named “Windows Computer_Extended” by default.&amp;#160; We can use this name, or you can rename this whatever you want.&amp;#160; It is your class.&amp;#160; I will leave it at the default.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_2.png" width="679" height="311" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Most important!&lt;/strong&gt;&amp;#160; Management Pack location.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#0000ff"&gt;This is CRITICAL&lt;/font&gt;&lt;/strong&gt;.&amp;#160; Spend some time making sure you are creating these attributes in the correct location.&amp;#160; If you leave this MP unsealed XML…. then any groups you create that use these attributes, will have to be placed in this same MP.&amp;#160; Then – if you use these groups for Overrides – those overrides will be force to go in this same MP.&amp;#160; There is a “cardinal rule” in SCOM… objects in one unsealed MP cannot reference another unsealed MP.&amp;#160; So – we cannot have a group in one unsealed MP, and then use that group for an override in another unsealed override MP.&amp;#160; &lt;/p&gt;  &lt;p&gt;So – we have two choices.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;1.&amp;#160; Keep an unsealed MP… and live with the fact that attribute, group, and override will all have to be placed here.&amp;#160; &lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;2.&amp;#160; Create the attribute and the dynamic group in the MP, then seal it.&amp;#160; Then – you can use this group in ANY of your override MP’s… for Exchange, SQL, etc…&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I &lt;strong&gt;&lt;em&gt;strongly&lt;/em&gt;&lt;/strong&gt; recommend option #2 for this exercise… but you can make this decision for yourself.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_4.png" width="500" height="394" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ok…. I will choose Option #2 (seal the MP), so I will create a new MP just for this extended class, and groups.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;On the next screen – we can put in our registry information:&lt;/p&gt;  &lt;p&gt;In this example – I am looking for a registry Value (1, 2, or 3), and my attribute type is “Int” for integer.&lt;/p&gt;  &lt;p&gt;For the frequency, set this to a reasonable frequency to discover you machines as they come on to you network.&amp;#160; Typically, once per day is sufficient (86400 seconds)&amp;#160; Remember – this will run against ALL your Windows Computers… so never set this more frequent than once per hour… that creates unnecessary overhead.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_5.png" width="682" height="598" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ok – lets examine our work!&lt;/p&gt;  &lt;p&gt;Go to Monitoring, Discovered Inventory, and change target type to our new class “Windows Computer_Extended”&lt;/p&gt;  &lt;p&gt;If you do this quickly – you may find it is empty.&amp;#160; This is what is happening behind the scenes:&amp;#160; All Windows Computers are now downloading our newly created MP.&amp;#160; They are going to run the registry attribute discovery, and submit their discovery data to the management server.&amp;#160; The Management Server will insert this discovery data in the database.&amp;#160; Over time, you will start to see all your Windows Computers pop into this class membership.&amp;#160; You will notice a new attribute now, in addition to all the existing Windows Computer attributes.&amp;#160; This attribute is “SupportLevel” and will be 1, 2, 3, or empty… depending on what each agent find in the registry.&lt;/p&gt;  &lt;p&gt;Now – I set my registry discovery to once per day…. so I will need to wait 24 hours before I can expect all my healthy agents to show up in this list.&amp;#160; To speed things up – I am going to bounce the HealthService on these example agents.&amp;#160; (Agents run all discoveries when a HealthService restarts, and then on their frequency schedule)&lt;/p&gt;  &lt;p&gt;Here is an example a few minutes after bouncing the HealthService on some agents:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_14.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_6.png" width="655" height="300" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Next on the list – create the groups.&amp;#160; I will create these in the same MP that the attributes exist in.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I will call my first group “CompanyName – Support Level 1 Servers Group”.&amp;#160; I like to append the word “Group” to all groups I create as a best practice.&amp;#160; This helps us determine this group class is actually a group when we see it in the list of classes in the UI.&amp;#160; I sure wish all MP authors would take this to heart, since every group is actually a singleton class.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_16.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_7.png" width="733" height="630" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;On the dynamic members screen – I will fins my “Windows Computer_Extended” class – and click Add.&amp;#160; What we now see – is that we have a new attribute to use, “Support Level”&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_18.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_8.png" width="562" height="303" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I will set this group to “SupportLevel Equals 1” and click OK.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_20.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_9.png" width="560" height="216" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – I can right-click my new group – and choose “View Group Members”&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_22.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_10.png" width="322" height="213" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_32.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_15.png" width="509" height="414" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Yee-haw!&amp;#160; It works!&amp;#160; Now – I simply repeat this above step – creating groups for SupportLevel 2, and 3.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_26.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_12.png" width="263" height="208" /&gt;&lt;/a&gt; &lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_28.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_13.png" width="268" height="211" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – that is done.&amp;#160; This is the area, that I recommend we stop… take a breather…. then seal the MP.&amp;#160; If you seal the MP – we will be able to use the groups for overrides in any other override MP.&amp;#160; If you choose not to seal the MP now… any overrides you use the groups for – will be forced into this same MP.&amp;#160; Please keep that in mind.&lt;/p&gt;  &lt;p&gt;Since I am harping on sealing the MP…. I am going to do a quick example of just that.&amp;#160; Jonathan Almquist has an excellent tutorial on sealing MP’s &lt;a href="http://blogs.technet.com/jonathanalmquist/archive/2008/08/19/seal-a-management-pack.aspx"&gt;HERE&lt;/a&gt; and we will use his example.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;**Note – when running the sn.exe commands to create our key…. we only need to do this one… not every time we want to seal an MP.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;***Critical note – you need to keep a backup of this key… because it will be required for making updates to this MP in the future, re-sealing, and keeping the ability to upgrade the existing MP in production.&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So, I create the folders, create the key using sn.exe, copy over the referenced MP’s from the RMS,&amp;#160; and now I am ready to seal.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;MPSeal.exe c:\mpseal\input\CompanyName.SupportLevel.MP.xml /I &amp;quot;c:\mpseal\mp&amp;quot; /Keyfile &amp;quot;c:\mpseal\key\PairKey.snk&amp;quot; /Company &amp;quot;CompanyName&amp;quot; /Outdir &amp;quot;c:\mpseal\output&amp;quot;&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Works great.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_24.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Creatingcustomdynamiccomputergroupsbased_144ED/image_thumb_11.png" width="457" height="241" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – I can &lt;strong&gt;&lt;em&gt;delete&lt;/em&gt;&lt;/strong&gt; my unsealed MP from the management group, and import my sealed MP.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Phew.&amp;#160; All the heavy lifting is done.&amp;#160; Now… I have my groups… I can start setting up overrides using these groups, or scoping notifications.&amp;#160; &lt;/p&gt;  &lt;p&gt;On my &lt;strong&gt;Support Level 1 group&lt;/strong&gt; – I will use this to set up my pager Notification subscriptions to only page based on specific classes, and this group.&lt;/p&gt;  &lt;p&gt;On my &lt;strong&gt;Support Level 2 group&lt;/strong&gt; – I will use this to override important alerts to High Priority… because I am using High Priority as a filter for email notifications, per my previous blog post here:&amp;#160; &lt;a title="http://blogs.technet.com/kevinholman/archive/2008/06/26/using-opsmgr-notifications-in-the-real-world-part-1.aspx" href="http://blogs.technet.com/kevinholman/archive/2008/06/26/using-opsmgr-notifications-in-the-real-world-part-1.aspx"&gt;http://blogs.technet.com/kevinholman/archive/2008/06/26/using-opsmgr-notifications-in-the-real-world-part-1.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On my &lt;strong&gt;Support Level 3 group&lt;/strong&gt; – I will use this group for tweaking/disabling rules and monitors for the group… turning off discoveries so they don't discover lab servers, scoping views, etc.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Maybe in my next post…. I will build on this MP… and show a really simple way to add the Health Service Watcher objects to these dynamic groups… for each Windows Computer object that is in the group – so we can use these groups for Heartbeat failure notifications.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3252822" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/management+pack/default.aspx">management pack</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Notification/default.aspx">Notification</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>Quick tip – using regular expressions in a dynamic group</title><link>http://blogs.technet.com/kevinholman/archive/2009/04/21/quick-tip-using-regular-expressions-in-a-dynamic-group.aspx</link><pubDate>Tue, 21 Apr 2009 22:29:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3228823</guid><dc:creator>kevinhol</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3228823.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3228823</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3228823</wfw:comment><description>&lt;p&gt;Here is a quick tip on using a regular expression when creating a group.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;OpsMgr dynamic inclusion rules are case sensitive.&lt;/p&gt;  &lt;p&gt;If I have a group that I want to contain all computers that START with “OM”…. I can use the following expression:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_2.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="184" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb.png" width="559" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The “^” tells regex to start a new line… without this – it will search the entire computername for “OM” instead of only servers with a name that &lt;strong&gt;&lt;em&gt;starts&lt;/em&gt;&lt;/strong&gt; with “OM”.&amp;#160; This shows the following group membership:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_4.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="253" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb_1.png" width="230" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;However – this is not all my “OM” servers.&amp;#160; This is because when some were built, they used a lower case name.&amp;#160; If I change the dynamic inclusion expression to “^om” I will only see the lower case servers (the NetBIOS Computer name is lower case… not the display name as shown):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_6.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="247" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb_2.png" width="224" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ok – how do I get them ALL in the same group?&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There are a couple ways.&lt;/p&gt;  &lt;p&gt;One way is to “OR” the two regex queries:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_8.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="180" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb_3.png" width="554" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Bingo!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_10.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="288" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb_4.png" width="229" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Another way – courtesy of Tim Helton – is to use the regex modifier (?i:) to make it case insensitive:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_12.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="185" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb_5.png" width="557" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Which yields:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_14.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="270" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb_6.png" width="222" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This should make dynamic groups a bit easier.&amp;#160; We can expand this to add the HealthService Watcher objects, which is typical for groups that we will scope notifications to:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_18.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="254" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb_8.png" width="561" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Which yields all my Windows Computers, and their Health Service Watcher components.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_16.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="397" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Quicktipusingregularexpressionsinadynami_CBB2/image_thumb_7.png" width="218" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3228823" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/management+pack/default.aspx">management pack</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>Authoring rules for Windows 2008 events, and how to cheat</title><link>http://blogs.technet.com/kevinholman/archive/2009/02/25/authoring-rules-for-windows-2008-events-and-how-to-cheat.aspx</link><pubDate>Wed, 25 Feb 2009 04:56:03 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3206389</guid><dc:creator>kevinhol</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3206389.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3206389</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3206389</wfw:comment><description>&lt;p&gt;So…. with the introduction of Server 2008 into OpsMgr… as a monitored agent, you might need to re-evaluate some of your old rules.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Almost all (if not all) of the basic event ID’s and parameters, in the security event log, have changed.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For instance, I had a rule to alert me on every RDP logon to every server in my lab.&amp;#160; I did this on Server 2003, using the following data source configuration:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_2.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="119" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb.png" width="404" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The logon event was 528, I used the Security event source (not really required in this case) and then I only wanted to alert on RDP/Console logon types… so that is where Parameter 4 came in.&amp;#160; I had to use LogParser to figure out which parameter is which, and talked about how to do that in these posts:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a title="Using Event Description as criteria for a rule" href="http://blogs.technet.com/kevinholman/archive/2008/04/22/using-event-description-as-criteria-for-a-rule.aspx"&gt;Using Event Description as criteria for a rule&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="How to find all possible event ID’s for a given event source" href="http://blogs.technet.com/kevinholman/archive/2009/02/16/how-to-find-all-possible-event-id-s-for-a-given-event-source.aspx"&gt;How to find all possible event ID’s for a given event source&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Using OpsMgr to see which servers have not been logged on to via RDP" href="http://blogs.technet.com/kevinholman/archive/2008/09/03/using-opsmgr-to-see-which-servers-have-not-been-logged-on-to-via-rdp.aspx"&gt;Using OpsMgr to see which servers have not been logged on to via RDP&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – I realized, since I rebuilt my main Terminal Server with Server 2008, this rule isnt alerting anymore.&lt;/p&gt;  &lt;p&gt;It is apparent that the new security event is now this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_4.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="640" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_1.png" width="537" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So – off I go to update my rule.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I will use Event ID 4624, that part is easy…. but now – which parameter is the logon type of “10” now?&lt;/p&gt;  &lt;p&gt;I can certainly use LogParser… and it will tell me, but in Server 2008 – there appears to be a shortcut:&amp;#160; Choose the Details Tab of the event you want, and all the parameters are listed, in order… and you simply have to count down:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_6.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="471" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_2.png" width="481" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Counting down from the top – that is Parameter 9.&amp;#160; So my new data source expression for the rule looks like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_8.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="119" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_3.png" width="417" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So – I will ONLY get alerts on those specific events.&amp;#160; But wait – I need to customize my Alert description!&amp;#160; I can use the same “cheat”.&amp;#160; In my alert description – I want to state something like “Username logged on to ServerName from IPAddress”.&amp;#160; I can get all of that right, and the parameters – right from this event:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_10.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="468" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_4.png" width="480" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Counting down – I can see this is parameter 6, 12, and 19.&amp;#160; So I make my alert description look like so:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_12.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="93" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_5.png" width="217" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And my alert?&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_14.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="76" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_6.png" width="277" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Perfect!&lt;/p&gt;  &lt;p&gt;Use this method to quickly figure out which parameters you want for your rule criteria, and your alert descriptions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="4"&gt;&lt;strong&gt;UPDATE – 2-25-2009&lt;/strong&gt;&lt;/font&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;I have to update this post – based on the comment from Raphael Burri&amp;#160; (&lt;a title="http://rburri.wordpress.com/" href="http://rburri.wordpress.com/"&gt;http://rburri.wordpress.com/&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In addition to the easy way to find out parameters in Server 2008 – he commented on an even better way to bring rich alert descriptions in… without much work.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So for this example – I will create a new rule – which will alert me when someone types a bad password while accessing my Terminal Server:&lt;/p&gt;  &lt;p&gt;The event in question – has changed from EventID 528 on Server 2000/2003 – to EventID 4625 on Server 2008:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_16.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="167" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_7.png" width="550" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – instead of using event parameter numbers in my Alert Description – I will use the event XPath name straight from the event!&amp;#160; Open the event… and choose the details tab.&amp;#160; Then choose the XML view.&amp;#160; It looks like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_18.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="631" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_8.png" width="645" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – to capture ANY of these “Event Data” fields… we could use parameters – counting down like the example I posted above.&amp;#160; OR – we can simply pull the parameter name – which is given to us right from the event:&lt;/p&gt;  &lt;p&gt;Simply use this format:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;$Data/EventData/DataItem/EventData/Data[@Name='EventParameterName']$&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For instance… I want my alert description for this alert to state:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(&lt;strong&gt;&lt;em&gt;Username)&lt;/em&gt;&lt;/strong&gt; typed a bad password accessing directly from computer: &lt;strong&gt;&lt;em&gt;(computername)&lt;/em&gt;&lt;/strong&gt; from IP: &lt;strong&gt;&lt;em&gt;(IP Address)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So from above – I can simply use the “Data Names” listed in the event data:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;$Data/EventData/DataItem/EventData/Data[@Name='&lt;b&gt;TargetUserName&lt;/b&gt;']$&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;$Data/EventData/DataItem/EventData/Data[@Name='&lt;b&gt;WorkstationName&lt;/b&gt;']$&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;$Data/EventData/DataItem/EventData/Data[@Name='&lt;b&gt;IpAddress&lt;/b&gt;']$&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My alert description now looks like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_20.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="206" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_9.png" width="275" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The alert comes in as:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_22.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="93" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/AuthoringrulesforWindows2008eventsandhow_1184B/image_thumb_10.png" width="318" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks for the tip Raphael!&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3206389" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/management+pack/default.aspx">management pack</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/2008/default.aspx">2008</category></item><item><title>How to find all possible event ID’s for a given event source</title><link>http://blogs.technet.com/kevinholman/archive/2009/02/16/how-to-find-all-possible-event-id-s-for-a-given-event-source.aspx</link><pubDate>Tue, 17 Feb 2009 01:09:47 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3203148</guid><dc:creator>kevinhol</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3203148.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3203148</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3203148</wfw:comment><description>&lt;p&gt;I recently got this question from a customer… and felt it would be good to blog about this.&lt;/p&gt;  &lt;p&gt;The customer wants to create an Alert, anytime there is a event in the System event log, from a USER32 event source:&lt;/p&gt;  &lt;p&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="294" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/HowtofindallpossibleeventIDsforagiveneve_B9B6/image_11.png" width="735" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;HOWEVER – it is a best practice in SCOM – to create our event matching criteria to be MOST SPECIFIC as possible.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The problem:&amp;#160; &lt;strong&gt;&lt;em&gt;How do I know all possible event ID’s that COULD show up under a given event source?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The solution?&amp;#160; &lt;strong&gt;&lt;em&gt;Use the MOM 2005 resource kit tool, called MPWizard.exe.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;NOTE:&amp;#160; The MOM 2005 MPWizard states that it needs to be run on a MOM 2005 management server… but I have tested, and it only really needs to be run on a machine with the MOM 2005 console installed…. if you don't have a MOM 2005 environment, simply install only the console and you can use this tool.&amp;#160; There might be a “cheat” way to run this tool registering a couple MOM 2005 DLL’s – but I haven't looked into that.&amp;#160; If you get a COM error, and cannot get this to run, and the MOM 2005 console is not an option – I recommend you check out using LogParser – which I have a link below.&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;MPWizard will let us interrogate the local computer, OR a remote computer, and determine &lt;strong&gt;ALL POSSIBLE&lt;/strong&gt; events for a given event source, and has the added benefit of showing us the &lt;strong&gt;&lt;em&gt;event parameters&lt;/em&gt;&lt;/strong&gt; as well.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For example, I will launch MPWizard, and choose “Event Source Monitoring”:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="384" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/HowtofindallpossibleeventIDsforagiveneve_B9B6/image4.png" width="497" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Give it a “TEST” rule group name… since we really wont be creating a MOM 2005 Management Pack here.&lt;/p&gt;  &lt;p&gt;Click “Add”, and choose the local computer, or a remote computer example.&amp;#160; &lt;/p&gt;  &lt;p&gt;Choose the event source we are interested in:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="416" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/HowtofindallpossibleeventIDsforagiveneve_B9B6/image8.png" width="458" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As you can see – this will interrogate the Event log source DLL for the USER32 event source, and show all possible events that *could* be created by this event source (dll) and their parameters for each event.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – I can create a much more specific rule – and include the event ID’s, and also use event parameters if needed:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="452" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/HowtofindallpossibleeventIDsforagiveneve_B9B6/image12.png" width="735" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – if I DONT want this alert on a specific group of machines…. I can create an exception, based on parameter 1:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="452" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/HowtofindallpossibleeventIDsforagiveneve_B9B6/image16.png" width="734" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Using the MOM 2005 MP wizard is a very easy way to find all possible event ID’s for a given event source, AND will show us the parameters that each event uses…. very helpful in keeping with SCOM best practices if being very specific, and using event parameters instead of searching the entire event description, which is resource intensive.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can get the MOM 2005 reskit download HERE:&amp;#160; &lt;a title="http://technet.microsoft.com/en-us/opsmgr/bb498240.aspx" href="http://technet.microsoft.com/en-us/opsmgr/bb498240.aspx"&gt;http://technet.microsoft.com/en-us/opsmgr/bb498240.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Also – be sure to check out how to use LogParser – another free tool – to find event parameters, in this blog post:&amp;#160; &lt;a title="Using Event Description as criteria for a rule" href="http://blogs.technet.com/kevinholman/archive/2008/04/22/using-event-description-as-criteria-for-a-rule.aspx"&gt;Using Event Description as criteria for a rule&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3203148" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/management+pack/default.aspx">management pack</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>What is a group anyway?</title><link>http://blogs.technet.com/kevinholman/archive/2009/02/05/what-is-a-group-anyway.aspx</link><pubDate>Thu, 05 Feb 2009 08:52:46 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3197326</guid><dc:creator>kevinhol</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3197326.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3197326</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3197326</wfw:comment><description>&lt;p&gt;So – this is a first part, of a multi-post series on creating groups.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The most common reason we create groups in OpsMgr… is to scope Notifications, Views, and to use for overrides.&lt;/p&gt;  &lt;p&gt;Most of the groups my customers create are dealing with Windows Computer objects.&amp;#160; The reason for this, is that the Windows Computer object class, is a “parent&amp;quot; level” class that works well for the group uses just mentioned.&amp;#160; Lets look at what a group really is… in XML:&lt;/p&gt;  &lt;p&gt;When we create a simple group to contain Windows Computers in the UI, it creates some basic XML behind the scenes.&amp;#160; Understanding this XML – will help us create much more powerful and dynamic groups down the road… doing things that cannot be done in the UI.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let's get started. &lt;/p&gt;  &lt;p&gt;I will create a new empty MP, named “GroupMP”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;With nothing in this MP… let’s look at the XML:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;ManagementPack ContentReadable=&amp;quot;true&amp;quot; xmlns:xsd=&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema&amp;quot;"&gt;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;/a&gt; xmlns:xsl=&amp;quot;&lt;a href="http://www.w3.org/1999/XSL/Transform&amp;quot;"&gt;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;/a&gt;&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Manifest&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Identity&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;GroupMP&amp;lt;/ID&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;1.0.0.0&amp;lt;/Version&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Identity&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;References&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Reference Alias=&amp;quot;SystemCenter&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;Microsoft.SystemCenter.Library&amp;lt;/ID&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Reference&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/References&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/Manifest&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Presentation&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Folders&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Folder ID=&amp;quot;Folder_ba0b8fceb992416c835fe9d66a6ce0a1&amp;quot; Accessibility=&amp;quot;Public&amp;quot; ParentFolder=&amp;quot;SystemCenter!Microsoft.SystemCenter.Monitoring.ViewFolder.Root&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Folders&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/Presentation&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;LanguagePacks&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;LanguagePack ID=&amp;quot;ENU&amp;quot; IsDefault=&amp;quot;false&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayStrings&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;GroupMP&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Description /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;Folder_ba0b8fceb992416c835fe9d66a6ce0a1&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayStrings&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/LanguagePack&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/LanguagePacks&amp;gt;    &lt;br /&gt;&amp;lt;/ManagementPack&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Not much there.&amp;#160; We have the &amp;lt;Manifest&amp;gt; section, which contains the name, version, ID, and a single reference – to the System Center Library MP.&amp;#160; The &amp;lt;Presentation&amp;gt; section simply contains the UI generated folder name, which will show up in the console, by default.&amp;#160; The &amp;lt;LanguagePacks&amp;gt; section contains the friendly names for the MP name and the folder… which will be displayed in the console.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now – lets add a group.&amp;#160; I will create a new group in the UI, named “ATestGroup”.&amp;#160; I will not give it any group membership…. and save it to my new MP, and export it.&amp;#160; Let’s see what changed:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;ManagementPack ContentReadable=&amp;quot;true&amp;quot; xmlns:xsd=&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema&amp;quot;"&gt;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;/a&gt; xmlns:xsl=&amp;quot;&lt;a href="http://www.w3.org/1999/XSL/Transform&amp;quot;"&gt;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;/a&gt;&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Manifest&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Identity&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;GroupMP&amp;lt;/ID&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;1.0.0.0&amp;lt;/Version&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Identity&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;References&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Reference Alias=&amp;quot;SystemCenter&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;Microsoft.SystemCenter.Library&amp;lt;/ID&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Reference&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;&lt;font color="#ff0000"&gt;&amp;lt;Reference Alias=&amp;quot;MicrosoftSystemCenterInstanceGroupLibrary6062780&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;Microsoft.SystemCenter.InstanceGroup.Library&amp;lt;/ID&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Reference&amp;gt;        &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/References&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/Manifest&amp;gt;    &lt;br /&gt;&amp;#160; &lt;strong&gt;&lt;font color="#ff0000"&gt;&amp;lt;TypeDefinitions&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;EntityTypes&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ClassTypes&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ClassType ID=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group&amp;quot; Accessibility=&amp;quot;Public&amp;quot; Abstract=&amp;quot;false&amp;quot; Base=&amp;quot;MicrosoftSystemCenterInstanceGroupLibrary6062780!Microsoft.SystemCenter.InstanceGroup&amp;quot; Hosted=&amp;quot;false&amp;quot; Singleton=&amp;quot;true&amp;quot; /&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ClassTypes&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/EntityTypes&amp;gt;        &lt;br /&gt;&amp;#160; &amp;lt;/TypeDefinitions&amp;gt;        &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&amp;#160; &lt;strong&gt;&lt;font color="#ff0000"&gt;&amp;lt;Monitoring&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Discoveries&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Discovery ID=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group.DiscoveryRule&amp;quot; Enabled=&amp;quot;true&amp;quot; Target=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group&amp;quot; ConfirmDelivery=&amp;quot;false&amp;quot; Remotable=&amp;quot;true&amp;quot; Priority=&amp;quot;Normal&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Category&amp;gt;Discovery&amp;lt;/Category&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DiscoveryTypes&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DiscoveryRelationship TypeID=&amp;quot;MicrosoftSystemCenterInstanceGroupLibrary6062780!Microsoft.SystemCenter.InstanceGroupContainsEntities&amp;quot; /&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DiscoveryTypes&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DataSource ID=&amp;quot;GroupPopulationDataSource&amp;quot; TypeID=&amp;quot;SystemCenter!Microsoft.SystemCenter.GroupPopulator&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;RuleId&amp;gt;$MPElement$&amp;lt;/RuleId&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;GroupInstanceId&amp;gt;$MPElement[Name=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group&amp;quot;]$&amp;lt;/GroupInstanceId&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;MembershipRules&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;MembershipRule Comment=&amp;quot;EMPTY_RULE_8eadaced-59c8-4ebc-a4e4-b8428a374442&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;MonitoringClass&amp;gt;$MPElement[Name=&amp;quot;SystemCenter!Microsoft.SystemCenter.AllComputersGroup&amp;quot;]$&amp;lt;/MonitoringClass&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;RelationshipClass&amp;gt;$MPElement[Name=&amp;quot;MicrosoftSystemCenterInstanceGroupLibrary6062780!Microsoft.SystemCenter.InstanceGroupContainsEntities&amp;quot;]$&amp;lt;/RelationshipClass&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value&amp;gt;True&amp;lt;/Value&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Equal&amp;lt;/Operator&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value&amp;gt;False&amp;lt;/Value&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/MembershipRule&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/MembershipRules&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DataSource&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Discovery&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Discoveries&amp;gt;        &lt;br /&gt;&amp;#160; &amp;lt;/Monitoring&amp;gt;        &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&amp;#160; &amp;lt;Presentation&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Folders&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Folder ID=&amp;quot;Folder_ba0b8fceb992416c835fe9d66a6ce0a1&amp;quot; Accessibility=&amp;quot;Public&amp;quot; ParentFolder=&amp;quot;SystemCenter!Microsoft.SystemCenter.Monitoring.ViewFolder.Root&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Folders&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/Presentation&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;LanguagePacks&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;LanguagePack ID=&amp;quot;ENU&amp;quot; IsDefault=&amp;quot;false&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayStrings&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;GroupMP&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;Folder_ba0b8fceb992416c835fe9d66a6ce0a1&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;&lt;font color="#ff0000"&gt;&amp;lt;DisplayString ElementID=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;ATestGroup&amp;lt;/Name&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group.DiscoveryRule&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;Populate ATestGroup&amp;lt;/Name&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Description&amp;gt;This discovery rule populates the group 'ATestGroup'&amp;lt;/Description&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;        &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayStrings&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/LanguagePack&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/LanguagePacks&amp;gt;    &lt;br /&gt;&amp;lt;/ManagementPack&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I have bolded in Red color – the new stuff.&lt;/p&gt;  &lt;p&gt;In the&lt;strong&gt; &amp;lt;Manifest&amp;gt;&lt;/strong&gt; section, we added a new reference… to the Microsoft.SystemCenter.InstanceGroup.Library MP, and gave it an alias of “MicrosoftSystemCenterInstanceGroupLibrary6062780”.&amp;#160; An alias is just a short way of referring to a management pack…&amp;#160; (just not so short when created by the UI)&amp;#160; :-)&lt;/p&gt;  &lt;p&gt;We also added a new section, &lt;strong&gt;&amp;lt;TypeDefinitions&amp;gt;&lt;/strong&gt;&amp;#160; In here – we defined a new class type…&amp;#160; for the UI generated group.&amp;#160; In this case – it is UINameSpace66d4622586f2416c804144a081d72995.Group.&amp;#160; The UI creates a randomly generated name for the group… just to make sure all group ID’s are unique in a management pack.&amp;#160; This definition of this group class, is based on the “Microsoft.SystemCenter.InstanceGroup” class, which is called from the recently referenced “Microsoft.SystemCenter.InstanceGroup.Library” MP, using the alias we just talked about.&amp;#160; Notice - “Singleton = True”.&amp;#160; Without going too deep at this point, this means the Group is a class, but is a single instance class… the only instance of this group class will be the group itself.&amp;#160; It may have members in the group at some point…. but those members are NOT instances of the group class.&amp;#160; They are simply objects, that have a containment relationship from the group class.&amp;#160; Ok, not too deep right now.&lt;/p&gt;  &lt;p&gt;We also added another new section to the XML - &lt;strong&gt;&amp;lt;Monitoring&amp;gt;&lt;/strong&gt;&amp;#160; Under &amp;lt;Monitoring&amp;gt; we will define the discovery that we need to run – in order to populate the group membership.&amp;#160; This discovery by default will call the “Microsoft.SystemCenter.GroupPopulator” (Group populator module) from the “SystemCenter!” alias (Microsoft.SystemCenter.Library MP)&amp;#160; This discovery will define what types of objects the group will contain, and any &lt;strong&gt;&amp;lt;MembershipRule&amp;gt;&lt;/strong&gt; expressions we need to use to “match” on those objects.&amp;#160; For instance… we might want to match only on Windows Computer objects, with a NetBIOS Name that starts with “EX*” using a wildcard.&amp;#160; All this can be done with the UI – but at this point – we left it all blank.&amp;#160; What you see is is a basic discovery that does nothing… in this case. &lt;/p&gt;  &lt;p&gt;We will also notice – that the &amp;lt;DisplayStrings&amp;gt; section got updated with a friendly name for the new discovery rule… which will be visible in the console for the object discovery.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ok….&amp;#160; now lets add a simple discovery rule… a dynamic rule, that will place Windows Computer objects that match the example I just used… NetBIOS names that start with “EX”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Whatisagroupanyway_14FC5/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Whatisagroupanyway_14FC5/image_thumb.png" width="600" height="240" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If I perform a “View Group Members” (after a short wait for the updated MP to be processed by the RMS, and the group populator module to complete)… I will see this when I “view group members”:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Whatisagroupanyway_14FC5/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/Whatisagroupanyway_14FC5/image_thumb_1.png" width="440" height="233" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So far, so good.&amp;#160; I have 4 Windows Computer objects in my group, all matching my criteria.&amp;#160; Lets look at the XML now, with the newest updates bold and blue:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;ManagementPack ContentReadable=&amp;quot;true&amp;quot; xmlns:xsd=&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema&amp;quot;"&gt;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;/a&gt; xmlns:xsl=&amp;quot;&lt;a href="http://www.w3.org/1999/XSL/Transform&amp;quot;"&gt;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;/a&gt;&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Manifest&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Identity&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;GroupMP&amp;lt;/ID&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;1.0.0.0&amp;lt;/Version&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Identity&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;References&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Reference Alias=&amp;quot;MicrosoftSystemCenterInstanceGroupLibrary6062780&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;Microsoft.SystemCenter.InstanceGroup.Library&amp;lt;/ID&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Reference&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Reference Alias=&amp;quot;SystemCenter&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;Microsoft.SystemCenter.Library&amp;lt;/ID&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Reference&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;&lt;font color="#0000ff"&gt;&amp;lt;Reference Alias=&amp;quot;MicrosoftWindowsLibrary6062780&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ID&amp;gt;Microsoft.Windows.Library&amp;lt;/ID&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Reference&amp;gt;        &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/References&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/Manifest&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;TypeDefinitions&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;EntityTypes&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ClassTypes&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ClassType ID=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group&amp;quot; Accessibility=&amp;quot;Public&amp;quot; Abstract=&amp;quot;false&amp;quot; Base=&amp;quot;MicrosoftSystemCenterInstanceGroupLibrary6062780!Microsoft.SystemCenter.InstanceGroup&amp;quot; Hosted=&amp;quot;false&amp;quot; Singleton=&amp;quot;true&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ClassTypes&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/EntityTypes&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/TypeDefinitions&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Monitoring&amp;gt;    &lt;br /&gt;&lt;font color="#404040"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Discoveries&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Discovery ID=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group.DiscoveryRule&amp;quot; Enabled=&amp;quot;true&amp;quot; Target=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group&amp;quot; ConfirmDelivery=&amp;quot;false&amp;quot; Remotable=&amp;quot;true&amp;quot; Priority=&amp;quot;Normal&amp;quot;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Category&amp;gt;Discovery&amp;lt;/Category&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DiscoveryTypes&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DiscoveryRelationship TypeID=&amp;quot;MicrosoftSystemCenterInstanceGroupLibrary6062780!Microsoft.SystemCenter.InstanceGroupContainsEntities&amp;quot; /&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DiscoveryTypes&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DataSource ID=&amp;quot;GroupPopulationDataSource&amp;quot; TypeID=&amp;quot;SystemCenter!Microsoft.SystemCenter.GroupPopulator&amp;quot;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;RuleId&amp;gt;$MPElement$&amp;lt;/RuleId&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;GroupInstanceId&amp;gt;$MPElement[Name=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group&amp;quot;]$&amp;lt;/GroupInstanceId&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;MembershipRules&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;&lt;font color="#0000ff"&gt;&amp;lt;MembershipRule&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;MonitoringClass&amp;gt;$MPElement[Name=&amp;quot;MicrosoftWindowsLibrary6062780!Microsoft.Windows.Computer&amp;quot;]$&amp;lt;/MonitoringClass&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;RelationshipClass&amp;gt;$MPElement[Name=&amp;quot;MicrosoftSystemCenterInstanceGroupLibrary6062780!Microsoft.SystemCenter.InstanceGroupContainsEntities&amp;quot;]$&amp;lt;/RelationshipClass&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;RegExExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Property&amp;gt;$MPElement[Name=&amp;quot;MicrosoftWindowsLibrary6062780!Microsoft.Windows.Computer&amp;quot;]/NetbiosComputerName$&amp;lt;/Property&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;MatchesWildcard&amp;lt;/Operator&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Pattern&amp;gt;EX*&amp;lt;/Pattern&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/RegExExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/MembershipRule&amp;gt;          &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/MembershipRules&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DataSource&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Discovery&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Discoveries&amp;gt;      &lt;br /&gt;&lt;/font&gt;&amp;#160; &amp;lt;/Monitoring&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;Presentation&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Folders&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Folder ID=&amp;quot;Folder_ba0b8fceb992416c835fe9d66a6ce0a1&amp;quot; Accessibility=&amp;quot;Public&amp;quot; ParentFolder=&amp;quot;SystemCenter!Microsoft.SystemCenter.Monitoring.ViewFolder.Root&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Folders&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/Presentation&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;LanguagePacks&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;LanguagePack ID=&amp;quot;ENU&amp;quot; IsDefault=&amp;quot;false&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayStrings&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;GroupMP&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;Folder_ba0b8fceb992416c835fe9d66a6ce0a1&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;GroupMP&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;ATestGroup&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DisplayString ElementID=&amp;quot;UINameSpace66d4622586f2416c804144a081d72995.Group.DiscoveryRule&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;Populate ATestGroup&amp;lt;/Name&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Description&amp;gt;This discovery rule populates the group 'ATestGroup'&amp;lt;/Description&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayString&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DisplayStrings&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/LanguagePack&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/LanguagePacks&amp;gt;    &lt;br /&gt;&amp;lt;/ManagementPack&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This basically just added a new reference, and modified the discovery rule section – to reflect our updated relationship and criteria.&lt;/p&gt;  &lt;p&gt;The new &lt;strong&gt;&amp;lt;reference&amp;gt;&lt;/strong&gt; was because we added the “Windows Computer” object class to the group definitions.&amp;#160; This class needs to be referenced, because it lives in the “Microsoft.Windows.Library” MP, which the UI gave a reference alias of “MicrosoftWindowsLibrary6062780”.&lt;/p&gt;  &lt;p&gt;The UPDATED &lt;strong&gt;&amp;lt;MembershipRule&amp;gt;&lt;/strong&gt; section now has some new information.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;First – it defines the &amp;lt;MonitoringClass&amp;gt; we will use in this membership rule to be Windows Computer objects.&lt;/p&gt;  &lt;p&gt;Next – it defines that the group will contain entities in the &amp;lt;RelationshipClass&amp;gt; section, esentially building the containment relationship between the Group Class Instance, and the Windows Computer objects.&lt;/p&gt;  &lt;p&gt;Last – it defines the expression to use to “match” on the defined property we chose (NetBIOS name) with a pattern (EX* wildcard)&amp;#160; We can match on ANY known attribute of a class… and NetBIOS name is but one of many on the Windows Computer class.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This understand will be a fundamental building block… for the next group posts… which will require that we see what is happening behind the scenes with a basic group, in order to use much more advanced groupings, that prove difficult or impossible to achieve in the console.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3197326" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kevinholman/archive/tags/management+pack/default.aspx">management pack</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item><item><title>Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx</link><pubDate>Tue, 27 Jan 2009 21:54:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3192151</guid><dc:creator>kevinhol</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.technet.com/kevinholman/comments/3192151.aspx</comments><wfw:commentRss>http://blogs.technet.com/kevinholman/commentrss.aspx?PostID=3192151</wfw:commentRss><wfw:comment>http://blogs.technet.com/kevinholman/rsscomments.aspx?PostID=3192151</wfw:comment><description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/boris_yanushpolsky/default.aspx" mce_href="http://blogs.msdn.com/boris_yanushpolsky/default.aspx"&gt;Boris&lt;/A&gt; wrote a cool article &lt;A href="http://blogs.msdn.com/boris_yanushpolsky/archive/2008/10/26/populating-groups-from-external-sources.aspx" mce_href="http://blogs.msdn.com/boris_yanushpolsky/archive/2008/10/26/populating-groups-from-external-sources.aspx"&gt;HERE&lt;/A&gt; on how to populate a group of computers in OpsMgr, from an external source…. such as active directory.&amp;nbsp; In his published example – you run an LDAP query to AD, to return a recordset list if computers, in order to populate them into a group.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This post will extend that, by showing how to do the same thing – but using a SQL database as the CMDB source for populating groups, instead of AD.&amp;nbsp; I had a customer who wanted to do this – to dynamically create groups for the purpose of scoping console views and notifications, to the teams that “owned” the different servers.&amp;nbsp; The CMDB contained this data, but it changes often, so manually controlling this proved to be a pain. &lt;/P&gt;
&lt;P&gt;Here is a very simple example of the CMDB, which contains the ServerName, and the team that owns the server, in the “ServerList” table:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_2.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_thumb.png" width=261 height=282 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;As you can see… I can easily write a SQL query to show ONLY servers owned by TEAM 1:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_4.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_thumb_1.png" width=546 height=179 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Let’s use this data source… to populate three groups.&amp;nbsp; Team 1 Group, Team 2 Group, and Team 3 group.&lt;/P&gt;
&lt;P&gt;First – I will post my finished XML example at the bottom – go grab that and open it – it will help you follow along with the XML requirements.&lt;/P&gt;
&lt;P&gt;In the XML… we basically need 4 components: &lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; We need to define the name of the MP, and add references to other MP’s we will depend on. (&amp;lt;Manifest&amp;gt; Section)&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; We need to define the groups themselves, and then define the relationships (stating that they will contain Windows Computer Objects) (&amp;lt;TypeDefinitions&amp;gt; section)&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; We need to run a discovery to populate the groups… this will be a script based discovery that runs only on the RMS, queries the CMDB, matches on the servername FQDN, and populates the group with a windows computer object. (&amp;lt;Monitoring&amp;gt; section)&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp; We need to modify the display strings in the XML MP – in order to show friendly display names for each of the above, in the UI. (&amp;lt;LanguagePacks&amp;gt; Section)&lt;/P&gt;
&lt;P&gt;You can simply take the XML posted below, and just modify each section with your custom group names… or add new groups by adding a new class, relationship, discovery/script, and presentation section to each.&lt;/P&gt;
&lt;P&gt;Here we go:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Section 1:&amp;nbsp; &amp;lt;Manifest&amp;gt;&lt;/H1&gt;
&lt;P&gt;Simply modify the &amp;lt;ID&amp;gt;, &amp;lt;Version&amp;gt;, and &amp;lt;Name&amp;gt; sections based on your custom MP naming standard.&lt;/P&gt;
&lt;P&gt;&amp;lt;ManagementPack ContentReadable="true" xmlns:xsd="&lt;A href="http://www.w3.org/2001/XMLSchema%22" mce_href='http://www.w3.org/2001/XMLSchema"'&gt;http://www.w3.org/2001/XMLSchema"&lt;/A&gt; xmlns:xsl="&lt;A href="http://www.w3.org/1999/XSL/Transform%22" mce_href='http://www.w3.org/1999/XSL/Transform"'&gt;http://www.w3.org/1999/XSL/Transform"&lt;/A&gt;&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;Manifest&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Identity&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;&lt;STRONG&gt;&amp;lt;ID&amp;gt;SQLBasedGroupDemo&amp;lt;/ID&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;&amp;lt;Version&amp;gt;1.0.0.0&amp;lt;/Version&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Identity&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;&lt;STRONG&gt;&amp;lt;Name&amp;gt;SQLBasedGroupDemo&amp;lt;/Name&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;References&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Alias="SC"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ID&amp;gt;Microsoft.SystemCenter.Library&amp;lt;/ID&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Alias="Windows"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ID&amp;gt;Microsoft.Windows.Library&amp;lt;/ID&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Alias="Health"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ID&amp;gt;System.Health.Library&amp;lt;/ID&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Alias="System"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ID&amp;gt;System.Library&amp;lt;/ID&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Version&amp;gt;6.0.6278.0&amp;lt;/Version&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PublicKeyToken&amp;gt;31bf3856ad364e35&amp;lt;/PublicKeyToken&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/References&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;/Manifest&amp;gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Section 2:&amp;nbsp; &amp;lt;TypeDefinitions&amp;gt;&lt;/H1&gt;
&lt;P&gt;The example below defines 3 groups, and the relationships for those groups (contains windows computer objects).&amp;nbsp; Simply replace the bolded red “Team1Group” example with a short name for your custom groups.&amp;nbsp; (We will define the UI friendly name later, in the &amp;lt;Presentation&amp;gt; section.&lt;/P&gt;
&lt;P&gt;&amp;lt;TypeDefinitions&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;EntityTypes&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ClassTypes&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ClassType ID="GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;" Accessibility="Internal" Abstract="false" Base="System!System.Group" Hosted="false" Singleton="true" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ClassType ID="GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team2Group&lt;/FONT&gt;&lt;/STRONG&gt;" Accessibility="Internal" Abstract="false" Base="System!System.Group" Hosted="false" Singleton="true" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ClassType ID="GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team3Group&lt;/FONT&gt;&lt;/STRONG&gt;" Accessibility="Internal" Abstract="false" Base="System!System.Group" Hosted="false" Singleton="true" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ClassTypes&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RelationshipTypes&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RelationshipType ID="GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;ContainsWindowsComputers" Accessibility="Internal" Abstract="false" Base="System!System.Containment"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Source&amp;gt;GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/Source&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Target&amp;gt;Windows!Microsoft.Windows.Computer&amp;lt;/Target&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RelationshipType&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RelationshipType ID="GroupPopulation.&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;Team2Group&lt;/STRONG&gt;&lt;/FONT&gt;ContainsWindowsComputers" Accessibility="Internal" Abstract="false" Base="System!System.Containment"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Source&amp;gt;GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team2Group&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/Source&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Target&amp;gt;Windows!Microsoft.Windows.Computer&amp;lt;/Target&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RelationshipType&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RelationshipType ID="GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team3Group&lt;/FONT&gt;&lt;/STRONG&gt;ContainsWindowsComputers" Accessibility="Internal" Abstract="false" Base="System!System.Containment"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Source&amp;gt;GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team3Group&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/Source&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Target&amp;gt;Windows!Microsoft.Windows.Computer&amp;lt;/Target&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RelationshipType&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RelationshipTypes&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;/EntityTypes&amp;gt; &lt;BR&gt;&amp;lt;/TypeDefinitions&amp;gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Section 3:&amp;nbsp; &amp;lt;Monitoring&amp;gt;&lt;/H1&gt;
&lt;P&gt;In this section – we define the discovery, and add the script to run.&amp;nbsp; In this example – I am running a VBscript with a SQL query to the CMDB.&amp;nbsp; You will need to modify the group name – just like you did above.&amp;nbsp; This is where we create a discovery to populate each group – so we will need one of these sections for each group in the MP.&amp;nbsp; Each of these sections will run a distinct script, with a different query, depending on which computers you want populated.&lt;/P&gt;
&lt;P&gt;I bolded in RED the group name sections you will need to modify, just like we did above… and you will need to modify the SQL DB information, and the script name.&lt;/P&gt;
&lt;P&gt;I set the discovery time to every 3600 seconds in this example…. you should probably set this to once or twice a day max…. no need to keep re-running it for groups that wont change that often.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;lt;Monitoring&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Discoveries&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Discovery ID="&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;Team1Group&lt;/STRONG&gt;&lt;/FONT&gt;.Discovery" Enabled="true" Target="SC!Microsoft.SystemCenter.RootManagementServer" ConfirmDelivery="true" Remotable="true" Priority="Normal"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Category&amp;gt;Discovery&amp;lt;/Category&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DiscoveryTypes&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DiscoveryClass TypeID="GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DiscoveryTypes&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;IntervalSeconds&amp;gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;3600&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/IntervalSeconds&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SyncTime /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ScriptName&amp;gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;Discovery.vbs&amp;lt;/ScriptName&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Arguments&amp;gt;$MPElement$ $Target/Id$&amp;lt;/Arguments&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ScriptBody&amp;gt;&amp;lt;![CDATA[Dim SourceId &lt;BR&gt;Dim objConnection &lt;BR&gt;Dim oRS &lt;BR&gt;Dim sConnectString &lt;BR&gt;Dim ManagedEntityID &lt;BR&gt;Dim oAPI &lt;BR&gt;Dim oDiscoveryData &lt;BR&gt;SourceId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = WScript.Arguments(0) &lt;BR&gt;ManagedEntityId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = WScript.Arguments(1) &lt;BR&gt;Set oAPI&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = CreateObject("MOM.ScriptAPI") &lt;BR&gt;Set oDiscoveryData&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = oAPI.CreateDiscoveryData(0,SourceId,ManagedEntityId) &lt;BR&gt;sConnectString = "Driver={SQL Server}; &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Server=OMDW; Database=CMDB&lt;/FONT&gt;&lt;/STRONG&gt;;" &lt;BR&gt;Set objConnection = CreateObject("ADODB.Connection") &lt;BR&gt;objConnection.Open sConnectString &lt;BR&gt;Set oRS = CreateObject("ADODB.Recordset") &lt;BR&gt;oRS.Open "&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;select ServerName from ServerList where MonitorGroup = 'Team 1'&lt;/FONT&gt;&lt;/STRONG&gt;", objConnection &lt;BR&gt;Set groupInstance = oDiscoveryData.CreateClassInstance("$MPElement[Name='GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;']$") &lt;BR&gt;While Not oRS.EOF &lt;BR&gt;Set serverInstance = oDiscoveryData.CreateClassInstance("$MPElement[Name='Windows!Microsoft.Windows.Computer']$") &lt;BR&gt;serverInstance.AddProperty "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$",oRS.Fields("ServerName") &lt;BR&gt;Set relationshipInstance = oDiscoveryData.CreateRelationshipInstance("$MPElement[Name='GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;ContainsWindowsComputers']$") &lt;BR&gt;relationshipInstance.Source = groupInstance &lt;BR&gt;relationshipInstance.Target = serverInstance &lt;BR&gt;oDiscoveryData.AddInstance relationshipInstance &lt;BR&gt;oRS.MoveNext &lt;BR&gt;Wend &lt;BR&gt;objConnection.Close &lt;BR&gt;Call oAPI.Return(oDiscoveryData) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;&amp;lt;/ScriptBody&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TimeoutSeconds&amp;gt;120&amp;lt;/TimeoutSeconds&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DataSource&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Discovery&amp;gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Section 4:&amp;nbsp; &amp;lt;LanguagePacks&amp;gt;&lt;/H1&gt;
&lt;P&gt;Here – we will take ALL of the modifications we made in the prior three steps, and match them up with friendly names to show in the UI:&lt;/P&gt;
&lt;P&gt;Essentially – just modify the MP name, group name, relationship name, and discovery name, to match what you did above…. and assign each a friendly name that you want to see in the UI.&amp;nbsp; I will bold in red the sections to modify, for the “Team 1 servers”.&amp;nbsp; You would continue this for as many groups as you used:&lt;/P&gt;
&lt;P&gt;&amp;lt;LanguagePacks&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;LanguagePack ID="ENU" IsDefault="true"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayStrings&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;SQLBasedGroupDemo&lt;/FONT&gt;&lt;/STRONG&gt;"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;SQL Based Group Population Demo MP&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team 1 Servers Group&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="GroupPopulation.&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;ContainsWindowsComputers"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team 1 SQL Based Group Contains Windows Computers&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team1Group&lt;/FONT&gt;&lt;/STRONG&gt;.Discovery"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Team 1 SQL Based Group Discovery&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="GroupPopulation.Team2Group"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Team 2 Servers Group&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="GroupPopulation.Team2GroupContainsWindowsComputers"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Team 2 SQL Based Group Contains Windows Computers&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="Team2Group.Discovery"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Team 2 SQL Based Group Discovery&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="GroupPopulation.Team3Group"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Team 3 Servers Group&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="GroupPopulation.Team3GroupContainsWindowsComputers"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Team 3 SQL Based Group Contains Windows Computers&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisplayString ElementID="Team3Group.Discovery"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Team 3 SQL Based Group Discovery&amp;lt;/Name&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayString&amp;gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DisplayStrings&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;/LanguagePack&amp;gt; &lt;BR&gt;&amp;lt;/LanguagePacks&amp;gt;&lt;/P&gt;
&lt;P&gt;That’s it!&amp;nbsp; If you get errors trying to import – you most likely modified a definition incompletely…. the import error should help you figure out what's wrong.&lt;/P&gt;
&lt;P&gt;Now I can go to my groups – find “Team 1 Group” and see if it is populated:&amp;nbsp; SUCCESS!&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_6.png" mce_href="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_6.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_thumb_2.png" width=645 height=225 mce_src="http://blogs.technet.com/blogfiles/kevinholman/WindowsLiveWriter/PopulatinggroupsfromaSQLserverCMDBstepby_B57E/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I am attaching my working sample MP below&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3192151" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/kevinholman/attachment/3192151.ashx" length="1704" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/kevinholman/archive/tags/database/default.aspx">database</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/management+pack/default.aspx">management pack</category><category domain="http://blogs.technet.com/kevinholman/archive/tags/Authoring/default.aspx">Authoring</category></item></channel></rss>