Export (0) Print
Expand All

Microsoft.Windows.RegistryDiscoverySingleProvider

System Center

Updated: August 10, 2011

Applies To: Operations Manager 2007 R2

The Microsoft.Windows.RegistryDiscoverySingleProvider module is a discovery data source module type that queries the Windows registry for a single value or key at a scheduled frequency and returns the results as System.Discovery.Data type data.

Usage

Use this module when you want to query the Windows registry inside a discovery workflow. This module supports retrieving any key or value from the HKEY_LOCAL_MACHINE hive of the registry only. For multi-string values, only the first string is returned. No filtering of data is provided in this module type. This should be used only when you know that the registry keys and values will always be present.

Type Definition


<DataSourceModuleType ID="Microsoft.Windows.RegistryDiscoverySingleProvider" Accessibility="Public">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>Microsoft.Windows.RegistryAttributeDefinitionsSchema</SchemaType>
      <SchemaType>System!System.Discovery.MapperSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="ComputerName" type="xsd:string" />
    <xsd:element name="AttributeName" type="xsd:ID" />
    <xsd:element name="Path" type="xsd:string" />
    <xsd:element name="PathType" type="xsd:integer" />
    <xsd:element name="AttributeType" type="xsd:integer" />
    <xsd:element name="Frequency" type="xsd:unsignedInt" />
    <xsd:element name="RegistryView" minOccurs="0" maxOccurs="1" type="RegistryViewType" />
    <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 ID="DS" TypeID="Microsoft.Windows.RegistryProviderSingle">
          <ComputerName>$Config/ComputerName$</ComputerName>
          <AttributeName>$Config/AttributeName$</AttributeName>
          <Path>$Config/Path$</Path>
          <PathType>$Config/PathType$</PathType>
          <AttributeType>$Config/AttributeType$</AttributeType>
          <Frequency>$Config/Frequency$</Frequency>
          <RegistryView>$Config/RegistryView$</RegistryView>
        </DataSource>
        <ConditionDetection ID="Mapping" TypeID="System!System.Discovery.ClassSnapshotDataMapper">
          <ClassId>$Config/ClassId$</ClassId>
          <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapping">
          <Node ID="DS" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>


Parameters

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

 

Parameter Type Overrideable Description

ComputerName

String

False

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

AttributeName

ID

False

Required parameter. An identifier for the value in the output data item. The identifier must consist only of letters, numbers, the underscore, hyphen, and period. Digits, the hyphen, and the period cannot be used to start the name.

Path

String

False

Required parameter. The path to collect in the registry under HKEY_LOCAL_MACHINE. This path can be a key or a value.

PathType

Integer

False

Required parameter. Specifies whether the path is a key or a value.

  • 0—Specifies that the path is to a key, for which the existence of the key should be checked.

  • 1—Specifies that the path is to a value that should be retrieved.

AttributeType

Integer

False

Required parameter. The data type of the value to return:

  • 0—Boolean

  • 1—String

  • 2—Integer

  • 3—Float

Values 1, 2, and 3 are used only when the PathType parameter is set to 1.

Frequency

Unsigned Integer

True

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

RegistryView

RegistryViewType

False

Optional parameter. Specifies the registry view type to access. If unspecified, defaults to a value of “default”.

ClassID

String

False

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”]$. For more information about the $MPElement variable notation, see $MPElement.

InstanceSettings

SettingsType

False

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

For more information about the ComputerName parameter, see the Microsoft.Windows.RegistryProbe module.

For more information about the AttributeName, Path, PathType, RegistryView, and AttributeType parameters, see the RegistryAttributeDefinitionsType schema type.

For more information about the Frequency parameter, see the System.Discovery.Scheduler module.

Composition

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

 

Workflow Run Order Module Type Usage

1

Microsoft.Windows.Discovery.RegistryProviderSingle

Triggers an internal registry probe module member to run at a scheduled, recurring interval in discovery workflows. Returns Microsoft.Windows.RegistryData data.

2

System.Discovery.ClassSnapShotDataMapper

Maps the received Microsoft.Windows.RegistryData data into System.Discovery.Data.

Related Modules

 

Module Type Usage

Microsoft.Windows.RegistryProvider

Queries Windows registry values or keys and returns Microsoft.Windows.RegistryData data.

Microsoft.Windows.Discovery.RegistryProviderSingle

Queries a single Windows registry value or key and returns Microsoft.Windows.RegistryData data.

Microsoft.Windows.Discovery.RegistryProvider

Queries Windows registry keys or values and returns Microsoft.Windows.RegistryData data. This type has simpler configuration, but only a single value or key can be specified. This should be used only from within a data source module type definition that returns discovery data.

Microsoft.Windows.Discovery.RegistryProviderSingle

Queries a single Windows registry value or key and returns System.Discovery.Data data. No filtering of data is provided in this module type. This should be used only when you know that the registry keys and values will always be present.

Microsoft.Windows.FilteredRegistryDiscoveryProvider

Queries the Windows registry on a timed interval and returns System.Discovery.Data data. This type takes an expression to filter data on.

Microsoft.Windows.RegistryDiscoveryProvider

Queries the Windows registry for keys or values and returns System.Discovery.Data data. No filtering of data is provided in this module type. This should be used only when you know that the registry keys and values will always be present.

External Module References

The Microsoft.Windows.Discovery.RegistryDiscoverySingleProvider module is a member of the following modules:

None.

Sample

The following example illustrates how to use the Microsoft.Windows.Discovery.RegistryDiscoverySingleProvider module to retrieve the product type of the target machine’s operating system. The information retrieved from the registry is used to instantiate the Microsoft.Windows.OperatingSystem class type and define the ProductType property. The module then maps the discovered class into discovery data.

WarningWarning
The ProductType property does not exist in the actual type definition of Microsoft.Windows.OperatingSystem. The sample below is for illustration purposes only.


<Discovery ID="Microsoft.SystemCenter.DiscoverWindowsProductType" Comment="Discover OperatingSystem.ProductType property" Enabled="true" Target="Windows!Microsoft.Windows.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal">
  <Category>Discovery</Category>
  <DiscoveryTypes>
    <DiscoveryClass TypeID="Windows!Microsoft.Windows.OperatingSystem">
      <Property PropertyID="ProductType" />
    </DiscoveryClass>
  </DiscoveryTypes>
  <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.RegistryDiscoverySingleProvider">
    <ComputerName>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
    <AttributeName>ProductType</AttributeName>
    <Path>SYSTEM\CurrentControlSet\Control\ProductOptions\ProductType</Path>
    <PathType>1</PathType>
    <AttributeType>1</AttributeType>
    <Frequency>86400</Frequency>
    <ClassId>$MPElement[Name="Windows!Microsoft.Windows.OperatingSystem"]$</ClassId>
    <InstanceSettings>
      <Settings>
        <Setting>
          <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
          <Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
        </Setting>
        <Setting>
          <Name>$MPElement[Name="Windows!Microsoft.Windows.OperatingSystem"]/ProductType$</Name>
          <Value>$Data/Values/ProductType$</Value>
        </Setting>
      </Settings>
    </InstanceSettings>
  </DataSource>
</Discovery>

Information

 

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.Discovery.Data

Implementation

Composite

Library

Microsoft.Windows.Library

 
Show:
© 2015 Microsoft