Share via


Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper

Applies To: Operations Manager 2007 R2

The Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper module is a data source module type that queries Windows Management Instrumentation (WMI) for object data at a scheduled, recurring interval and returns the discovered class type instance as System.Discovery.Data type data.

Usage

Use this module only when you are creating a discovery workflow and want to discover class type instances. For more information about discoveries in management packs, see Discovery. For more information about relationship types, see ClassType.

Type Definition

<DataSourceModuleType ID="Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper" Accessibility="Public">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.Discovery.MapperSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="NameSpace" type="xsd:string" />
    <xsd:element name="Query" type="xsd:string" />
    <xsd:element name="Frequency" type="xsd:unsignedInt" />
    <xsd:element name="ClassId" type="xsd:string" />
    <xsd:element name="InstanceSettings" minOccurs="0" maxOccurs="1" type="SettingsType" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource TypeID="System!System.Discovery.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>
        <ConditionDetection ID="Mapper" TypeID="System!System.Discovery.ClassSnapshotDataMapper">
          <ClassId>$Config/ClassId$</ClassId>
          <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper">
          <Node ID="Probe">
            <Node ID="Scheduler" />
          </Node>
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>

Parameters

The Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper 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 parameter. Specifies the frequency, in seconds, at which to run the WMI.

ClassID

GUID

False

Required parameter. Specifies the ID of the class type into which the WMI object is to be mapped. Must always be in the following format: $MPElement[Name=”ClassTypeID”]$. For more information about the $MPElement variable notation, see $MPElement.

InstanceSettings

SettingsType

False

Required. Defines all property values of the discovered class type instances.

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

Composition

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

Workflow Run Order Module Type Usage

System.Discovery.Scheduler

1

Microsoft.Windows.WmiProbe

Returns the queried WMI object data as System.PropertyBagData and passes it on to the subsequent mapping module.

2

System.Discovery.ClassSnapShotDataMapper

Maps the received System.PropertyBagData data into System.Discovery.Data.

Module Type Usage

Microsoft.Windows.Discovery.WMISinglePropertyProvider2

Queries Windows Management Instrumentation (WMI) for object and single property data at a scheduled, recurring interval and returns the results as System.Discovery.Data type data.

Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper

Queries WMI for object data at a scheduled, recurring interval and returns the discovered relationship type instance as System.Discovery.Data type data.

External Module References

None.

Sample

The following XML sample illustrates how the Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper module is used in a discovery.

<Discovery ID="Microsoft.Demo.Discovery.ApplicationYComponent.Discovery" Enabled="true" Target="Microsoft.Demo.Discovery.AppY" ConfirmDelivery="false" Remotable="true" Priority="Normal">
  <Category>Discovery</Category>
   <DiscoveryTypes>
     <DiscoveryClass TypeID="Microsoft.Demo.Discovery.ApplicationYComponent">
      <Property PropertyID="ID" />
      <Property PropertyID="ExecutableName" />
      <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
    </DiscoveryClass>
    <DiscoveryRelationship TypeID="Microsoft.Demo.Discovery.AppYHostsAppYComponent" />
  </DiscoveryTypes>
   <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper">
    <NameSpace>\\$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\ROOT\CIMV2</NameSpace>
    <Query>SELECT Handle,ExecutablePath,Name FROM Win32_Process WHERE Name = 'cmd.exe'</Query>
    <Frequency>60</Frequency>
    <ClassId>$MPElement[Name="Microsoft.Demo.Discovery.AppYComponent"]$</ClassId>
     <InstanceSettings>
       <Settings>
         <Setting>
          <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
          <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
        </Setting>
         <Setting>
          <Name>$MPElement[Name="Microsoft.Demo.Discovery.AppYComponent"]/ID$</Name>
          <Value>$Data/Property[@Name='Handle']$</Value>
        </Setting>
         <Setting>
          <Name>$MPElement[Name="Microsoft.Demo.Discovery.AppYComponent"]/ExecutableName$</Name>
          <Value>$Data/Property[@Name='ExecutablePath']$</Value>
        </Setting>
         <Setting>
          <Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
          <Value>$Data/Property[@Name='Name']$</Value>
        </Setting>
      </Settings>
    </InstanceSettings>
  </DataSource>
</Discovery>

Information

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.Discovery.Data

Implementation

Composite

Library

Microsoft.Windows.Library