<?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>BWren's Management Space : WMI</title><link>http://blogs.technet.com/brianwren/archive/tags/WMI/default.aspx</link><description>Tags: WMI</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>WMI Events in OpsMgr 2007</title><link>http://blogs.technet.com/brianwren/archive/2007/08/22/wmi-events-in-opsmgr-2007.aspx</link><pubDate>Wed, 22 Aug 2007 19:14:29 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1803456</guid><dc:creator>Brian Wren</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/brianwren/comments/1803456.aspx</comments><wfw:commentRss>http://blogs.technet.com/brianwren/commentrss.aspx?PostID=1803456</wfw:commentRss><description>&lt;p&gt;I've already explained how to work with WMI events in MOM 2005 in&amp;nbsp;an article in &lt;a class="" href="http://www.microsoft.com/technet/technetmag/issues/2006/09/WMIEvents" mce_href="http://www.microsoft.com/technet/technetmag/issues/2006/09/WMIEvents"&gt;TechNet Magazine&lt;/a&gt;.&amp;nbsp; Most of the information in that article still applies since it covers the basics of how WMI events work and how to write a query to detect them.&amp;nbsp; What has changed significantly though is how to use them in Operations Manager.&amp;nbsp; I suppose a follow up article would be in order, but a simple blog post should be enough to give you the information you need.&lt;/p&gt; &lt;p&gt;First of all, WMI events in OpsMgr 2007 are used for exactly the same purpose as in MOM 2005.&amp;nbsp; The one big difference is that we no longer have WMI providers for OpsMgr objects to monitor for things like the modification of an alert.&amp;nbsp; We're working on such a different platform though, that those old scenarios don't really apply anymore anyway.&amp;nbsp; &lt;/p&gt; &lt;p&gt;I'm going to speak completely in terms of the Operations Console since that's where most people work with Operations Manager - at least at this early stage of its life.&amp;nbsp; If you're more comfortable working directory with the XML of a management pack, then you'll know exactly what pieces of this information to pull out.&lt;/p&gt; &lt;p&gt;You can create a monitor or rule for a WMI event using the appropriate wizard in the Operations Console.&amp;nbsp; If I have to guide you to those or define the different between an rule and a monitor, then you probably want to start on some more basic monitoring before tackling this topic.&amp;nbsp; The namespace and query are going to be exactly the same as the ones you created in MOM 2005.&amp;nbsp; Again, check my TechNet article if you need some help there.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WMI Event Filter Expressions&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;As discussed in my article, you can specify criteria in the WMI query itself, or you can write a general query and specify the criteria separately.&amp;nbsp; In MOM 2005, that meant specifying criteria in the rule.&amp;nbsp; In OpsMgr 2007, you need to provide a filter expression.&amp;nbsp; The question is how to build it.&lt;/p&gt; &lt;p&gt;The wizard for creating a WMI Event monitor/rule actually won't let you specify no criteria.&amp;nbsp; The Next button won't be active until you provide some entry.&amp;nbsp; If you have a query that doesn't need any filter (which is entirely reasonable), then just specify some bogus filter.&amp;nbsp; Once the monitor/rule is created, open up its properties and delete the filter.&amp;nbsp; It's entirely valid to have a monitor/rule with no filter - the wizard just doesn't let you do it.&lt;/p&gt; &lt;p&gt;If you are going to provide filter, the parameter name needs to be in following format:&lt;/p&gt; &lt;blockquote&gt; &lt;p mce_keep="true"&gt;Collection[@Name='TargetInstance']/Property[@Name=&amp;lt;property name&amp;gt;]&lt;/p&gt;&lt;/blockquote&gt; &lt;p mce_keep="true"&gt;&lt;strong&gt;Example - No Filter&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p mce_keep="true"&gt;We can show this with a simple example.&amp;nbsp; Let's fire the rule when Notepad starts.&amp;nbsp; One method would be to use the following criteria with no filter:&lt;/p&gt; &lt;blockquote&gt; &lt;p mce_keep="true"&gt;SELECT&amp;nbsp;*&amp;nbsp;FROM __InstanceCreationEvent WITHIN 30 WHERE TargetInstance ISA 'win32_process' AND TargetInstance.Name = 'notepad.exe'&lt;/p&gt;&lt;/blockquote&gt; &lt;p mce_keep="true"&gt;&lt;strong&gt;Example - Filter&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p mce_keep="true"&gt;The second option would be to use the following query:&lt;/p&gt; &lt;blockquote&gt; &lt;p mce_keep="true"&gt;SELECT&amp;nbsp;*&amp;nbsp;FROM __InstanceCreationEvent WITHIN 30 WHERE TargetInstance ISA 'win32_process' &lt;/p&gt;&lt;/blockquote&gt; &lt;p mce_keep="true"&gt;with the following filter:&lt;/p&gt; &lt;blockquote&gt;Parameter Name: Collection[@Name='TargetInstance']/Property[@Name='Name'] equals&lt;br&gt;Operator: Equals&lt;br&gt;Value: notepad.exe&lt;/blockquote&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1803456" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/brianwren/archive/tags/OpsMgr/default.aspx">OpsMgr</category><category domain="http://blogs.technet.com/brianwren/archive/tags/WMI/default.aspx">WMI</category></item></channel></rss>