Share via


Microsoft.Windows.WmiProvider

Applies To: Operations Manager 2007 R2

The Microsoft.Windows.WmiProvider module is a data source module type that queries a Windows Management Instrumentation (WMI) namespace at a scheduled frequency and returns the results as System.PropertyBagData type data.

Usage

Use this module when you want to query for WMI objects and return the data within a workflow such as a rule or monitor.

Type Definition

<DataSourceModuleType ID="Microsoft.Windows.WmiProvider" Accessibility="Public">
  <Configuration>
    <xsd:element name="NameSpace" type="xsd:string" />
    <xsd:element name="Query" type="xsd:string" />
    <xsd:element name="Frequency" type="xsd:unsignedInt" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource TypeID="System!System.Scheduler" ID="Scheduler">
          <Scheduler>
            <SimpleReccuringSchedule>
              <Interval Unit="Seconds">$Config/Frequency$</Interval>
            </SimpleReccuringSchedule>
            <ExcludeDates />
          </Scheduler>
        </DataSource>
        <ProbeAction TypeID="Microsoft.Windows.WmiProbe" ID="Probe">
          <NameSpace>$Config/NameSpace$</NameSpace>
          <Query>$Config/Query$</Query>
        </ProbeAction>
      </MemberModules>
      <Composition>
        <Node ID="Probe">
          <Node ID="Scheduler" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>

Parameters

The Microsoft.Windows.WmiProvider module supports the configuration parameters described in the following table.

Parameter Type Overrideable Description

Namespace

String

False

Required parameter. Specifies the WMI namespace within which the module is to run the query.

Query

String

False

Required parameter. Specifies the SELECT WMI query to run.

Frequency

Unsigned Integer

True

Required. Specifies the frequency, in seconds, at which to run the WMI query.

For more information about the Namespace and Query parameters, see the Microsoft.Windows.WmiProbe module.

Composition

The Microsoft.Windows.WmiProvider module is a composite module that contains the member modules described in the following table.

Workflow Run Order Module Type Usage

1

System.Scheduler

Triggers the subsequent probe module to run at a scheduled, recurring interval.

2

Microsoft.Windows.WmiProbe

Runs the WMI query and returns the System.PropertyBagData data.

None.

External Module References

The Microsoft.Windows.WmiProvider module is a member of the public module described in the following table.

Module Type Library Usage

Microsoft.Windows.Discovery.WMISinglePropertyProvider2

Microsoft.Windows.Library

Returns single object WMI data as System.Discovery.Data at a scheduled, recurring interval.

Sample

The following XML sample shows how you can use the Microsoft.Windows.WmiProvider module in a UnitMonitorType element definition. This particular unit monitor type is applied only when you want to create a monitor that changes state based on WMI data.

<UnitMonitorType ID="Microsoft.Windows.WmiProvider.SingleEventManualReset2StateMonitorType" Accessibility="Public">
  <MonitorTypeStates>
    <MonitorTypeState ID="EventRaised" />
    <MonitorTypeState ID="ManualResetEventRaised" NoDetection="true" />
  </MonitorTypeStates>
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="NameSpace" type="xsd:string" />
    <xsd:element name="Query" type="xsd:string" />
    <xsd:element name="Frequency" type="xsd:integer" />
    <xsd:element name="Expression" type="ExpressionType" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <MonitorImplementation>
    <MemberModules>
      <DataSource TypeID="Microsoft.Windows.WmiProvider" ID="DataSource">
        <NameSpace>$Config/NameSpace$</NameSpace>
        <Query>$Config/Query$</Query>
        <Frequency>$Config/Frequency$</Frequency>
      </DataSource>
      <ConditionDetection TypeID="System!System.ExpressionFilter" ID="FilterCondition">
        <Expression>$Config/Expression$</Expression>
      </ConditionDetection>
    </MemberModules>
    <RegularDetections>
      <RegularDetection MonitorTypeStateID="EventRaised">
        <Node ID="FilterCondition">
          <Node ID="DataSource" />
        </Node>
      </RegularDetection>
    </RegularDetections>
  </MonitorImplementation>
</UnitMonitorType>

Information

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.PropertyBagData

Implementation

Composite

Library

Microsoft.Windows.Library