Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Microsoft.Windows.FilteredRegistryClassAndRelationshipDiscoveryProvider

Microsoft.Windows.FilteredRegistryClassAndRelationshipDiscoveryProvider

System Center

Updated: August 31, 2011

Applies To: Operations Manager 2007 R2

The Microsoft.Windows.FilteredRegistryClassAndRelationshipDiscoveryProvider data source module type is a discovery provider that queries the Windows registry at a schedule frequency and returns the results as System.Discovery.Data type data.

Usage

This module is used to discover instances of a class and instances of a relationship involving that class at the same time. This provider only works with a registry discovery; for script-based discoveries, you must discover the relationship within the script. This provider is only required with containment relationships; hosting relationships are discovered automatically when instances of a class in a hosting relationship are discovered. For more information about containment and hosting relationships, see Relationships.

Type Definition

      <DataSourceModuleType ID="Microsoft.Windows.FilteredRegistryClassAndRelationshipDiscoveryProvider" Accessibility="Public" Batching="false">
        <Configuration>
          <IncludeSchemaTypes>
            <SchemaType>Microsoft.Windows.RegistryAttributeDefinitionsSchema</SchemaType>
            <SchemaType>System!System.Discovery.MapperSchema</SchemaType>
            <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
          </IncludeSchemaTypes>
          <xsd:element name="ComputerName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="RegistryAttributeDefinitions" type="RegistryAttributeDefinitionsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="Frequency" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="ClassId" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="ClassInstanceSettings" type="SettingsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="RelationshipId" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="RelationshipInstanceSettings" minOccurs="0" maxOccurs="1" type="SettingsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="SourceTypeId" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="SourceRoleSettings" minOccurs="0" maxOccurs="1" type="SettingsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="TargetTypeId" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="TargetRoleSettings" minOccurs="0" maxOccurs="1" type="SettingsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="Expression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <OverrideableParameters>
          <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
        </OverrideableParameters>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="DS" TypeID="Microsoft.Windows.Discovery.RegistryProvider">
                <ComputerName>$Config/ComputerName$</ComputerName>
                <RegistryAttributeDefinitions>$Config/RegistryAttributeDefinitions$</RegistryAttributeDefinitions>
                <Frequency>$Config/Frequency$</Frequency>
              </DataSource>
              <ConditionDetection ID="Mapping" TypeID="System!System.Discovery.FilteredClassAndRelationshipSnapshotDataMapper">
                <Expression>$Config/Expression$</Expression>
                <ClassId>$Config/ClassId$</ClassId>
                <ClassInstanceSettings>$Config/ClassInstanceSettings$</ClassInstanceSettings>
                <RelationshipId>$Config/RelationshipId$</RelationshipId>
                <RelationshipInstanceSettings>$Config/RelationshipInstanceSettings$</RelationshipInstanceSettings>
                <SourceTypeId>$Config/SourceTypeId$</SourceTypeId>
                <SourceRoleSettings>$Config/SourceRoleSettings$</SourceRoleSettings>
                <TargetTypeId>$Config/TargetTypeId$</TargetTypeId>
                <TargetRoleSettings>$Config/TargetRoleSettings$</TargetRoleSettings>
              </ConditionDetection>
            </MemberModules>
            <Composition>
              <Node ID="Mapping">
                <Node ID="DS" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.Discovery.Data</OutputType>
      </DataSourceModuleType>

Parameters

The Microsoft.Windows.FilteredRegistryClassAndRelationshipDiscoveryProvider module supports the following configuration parameters.

 

Parameter Type Description

Computer Name

String

Required parameter. The name of the computer from which to query the registry.

RegistryAttributeDefinitions

RegistryAttributeDefinitionsType

Required parameter. The set of keys and values to gather from the registry.

Frequency

Integer

Required parameter. Specifies the frequency, in seconds, at which to run the query over the Windows registry.

ClassId

String

Required parameter. Specifies the ID of the class type into which the registry data is to be mapped. Must always be in the following format: $MPElement[Name=”ClassTypeID”]$.

ClassInstanceSettings

SettingsType

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

RelationshipId

String

Required parameter. The ID of the relationship to discover instances of.

RelationshipInstanceSettings

SettingsType

Optional parameter. Defines the key property values of the discovered relationship type instances.

SourceTypeId

String

Required parameter. The ID of the source class in the relationship.

SourceRoleSettings

SettingsType

Optional parameter. Defines the key property values of the discovered source class instances.

TargetTypeId

String

Required parameter. The ID of the target class in the relationship.

TargetRoleSettings

SettingsType

Optional parameter. Defines the key property values of the discovered target class instances.

Expression

ExpressionType

Required parameter. Contains the filter expression to apply to the registry data.

The parameters RelationshipInstanceSettings, SourceRoleSettings, and TargetRoleSettings are listed as optional. However, those parameters are only optional if the class is a singleton class. If the class has more than one instance, the property values are required.

Composition

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

 

Workflow Run Order Module Type Usage

1

Microsoft.Windows.Discovery.RegistryProvider

Discovery data source module type that queries the Windows registry at a scheduled frequency and returns the results as Microsoft.Windows.RegistryData type data.

2

System.Discovery.FilteredClassAndRelationshipSnapshotDataMapper

Data mapper that takes System.BaseData type data as input and outputs System.Discovery.Data type data.

Related Modules

 

Module Type Usage

Microsoft.Windows.RegistryClassAndRelationshipDiscoveryProvider

Provides a registry class and relationship discovery, but without a filter to narrow the results.

External Module References

None.

Sample

The following example demonstrates a simple discovery using Microsoft.Windows.FilteredRegistryClassAndRelationshipDiscoveryProvider. This management pack contains two classes Class1 and Class2. These classes are related by a containment relationship named Class1ContainsClass2. The discovery discovers instances of Class1 as well as instances of the relationship.

      <Discovery ID="MPAuthor.Relationship.DiscoverClass1" Enabled="true" Target="MPAuthor.Relationship.Target" ConfirmDelivery="true" Remotable="true" Priority="Normal">
        <Category>Discovery</Category>
        <DiscoveryTypes>
          <DiscoveryClass TypeID="MPAuthor.Relationship.Class1" />
          <DiscoveryRelationship TypeID="MPAuthor.Relationship.Class1ContainsClass2" />
        </DiscoveryTypes>
        <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryClassAndRelationshipDiscoveryProvider">
          <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
          <RegistryAttributeDefinitions>
            <RegistryAttributeDefinition>
              <AttributeName>TargetObjectExists</AttributeName>
              <Path>SOFTWARE\MPAuthor\Relationship\TargetObject</Path>
              <PathType>1</PathType>
              <AttributeType>0</AttributeType>
            </RegistryAttributeDefinition>
            <RegistryAttributeDefinition>
              <AttributeName>TargetObject</AttributeName>
              <Path>SOFTWARE\MPAuthor\Relationship\TargetObject</Path>
              <PathType>1</PathType>
              <AttributeType>1</AttributeType>
            </RegistryAttributeDefinition>
          </RegistryAttributeDefinitions>
          <Frequency>120</Frequency>
          <ClassId>$MPElement[Name="MPAuthor.Relationship.Class1"]$</ClassId>
          <ClassInstanceSettings>
            <Settings>
              <Setting>
                <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
                <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
              </Setting>
            </Settings>
          </ClassInstanceSettings>
          <RelationshipId>$MPElement[Name='MPAuthor.Relationship.Class1ContainsClass2']$</RelationshipId>
          <SourceTypeId>$MPElement[Name='MPAuthor.Relationship.Class1']$</SourceTypeId>
          <SourceRoleSettings>
            <Settings>
              <Setting>
                <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
                <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
              </Setting>
            </Settings>
          </SourceRoleSettings>
          <TargetTypeId>$MPElement[Name='MPAuthor.Relationship.Class2']$</TargetTypeId>
          <TargetRoleSettings>
            <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="MPAuthor.Relationship.Class2"]/Name$</Name>
                <Value>$Data/Values/TargetObject$</Value>
              </Setting>
            </Settings>
          </TargetRoleSettings>
          <Expression>
            <SimpleExpression>
              <ValueExpression>
                <XPathQuery Type="String">Values/TargetObjectExists</XPathQuery>
              </ValueExpression>
              <Operator>Equal</Operator>
              <ValueExpression>
                <Value Type="String">true</Value>
              </ValueExpression>
            </SimpleExpression>
          </Expression>
        </DataSource>
      </Discovery>

Information

 

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.Discovery.Data

Implementation

Composite

Library

Microsoft.Windows.Library

 
Show:
© 2015 Microsoft