Microsoft.Windows.RegistryTriggerProbe
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
The Microsoft.Windows.RegistryTriggerProbe module type is a trigger-only probe action module that is used to gather data from the Windows registry. The module returns the registry data as Microsoft.Windows.RegistryData data.
Usage
Use this module when you want to gather data from the Windows registry on a monitored computer. The module gathers one or more keys or values from the registry and provides them as a single Microsoft.Windows.RegistryData data item. 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 by the probe. This module uses the incoming data only as a trigger, so do not implement this module type if you intend to parse the incoming data in some way. For more information about trigger-only modules, see ProbeActionModuleType and TriggerOnly.
Type Definition
<ProbeActionModuleType ID="Microsoft.Windows.RegistryTriggerProbe" Accessibility="Public">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>Microsoft.Windows.RegistryAttributeDefinitionsSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="ComputerName" type="xsd:string" />
<xsd:element name="RegistryAttributeDefinitions" type="RegistryAttributeDefinitionsType" />
</Configuration>
<ModuleImplementation>
<Native>
<ClassID>472364F2-A1F0-41C0-9A8F-E00C92C2AB31</ClassID>
</Native>
</ModuleImplementation>
<OutputType>Microsoft.Windows.RegistryData</OutputType>
<TriggerOnly>true</TriggerOnly>
</ProbeActionModuleType>
Parameters
The Microsoft.Windows.RegistryTriggerProbe module supports the configuration parameters described in the following table.
Parameter | Type | Description |
---|---|---|
ComputerName |
String |
Required parameter. The name of the computer from which to query the registry. |
RegistryAttributeDefinitions |
Required parameter. The set of keys and values to gather from the registry. |
ComputerName
The ComputerName configuration is most commonly passed to the module by using the $Target notation, although it can be specified as any string. The module attempts to connect to either the local computer’s registry or a remote computer’s registry, depending on the configuration that is passed. For a workflow that is targeted at a Windows-based computer, the ComputerName parameter is specified in the following code example:
<ComputerName>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
If the target is a class that is hosted by a computer, hosting references are added as required. For example:
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
For more information about the RegistryAttributeDefinitionsparameter, see RegistryAttributeDefinitionsType.
Composition
The Microsoft.Windows.RegistryTriggerProbe module is a native module.
Errors
The errors listed in the following table can occur from within the Microsoft.Windows.RegistryTriggerProbe module.
Exception | Reason |
---|---|
31901 |
The module failed to connect to the registry. |
31903 |
The module failed to collect the some attributes from the registry. |
Related Modules
Module Type | Usage |
---|---|
Queries the Windows registry and returns Microsoft.Windows.RegistryData data. |
External Module References
None.
Sample
The following XML sample shows an example of a task that uses the Microsoft.Windows.RegistryTriggerProbe probe module to return a set of values from the registry:
<Task ID="Microsoft.Samples.GetRegistryData" Accessibility="Internal" Target="Microsoft.Samples.ApplicationX">
<Category>Operations</Category>
<ProbeAction ID="RegistryProbe" TypeID="Windows!Microsoft.Windows.RegistryTriggerProbe">
<ComputerName>$Target/Host/Property[Type='Windows!Microsoft.Windows.Computer']/NetworkName$</ComputerName>
<RegistryAttributeDefinitions>
<RegistryAttributeDefinition>
<AttributeName>ApplicationXExists</AttributeName>
<Path>SOFTWARE\OpsMgrSamples\ApplicationX</Path>
<PathType>0</PathType>
<AttributeType>0</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>ApplicationXVersion</AttributeName>
<Path>SOFTWARE\OpsMgrSamples\ApplicationX\Version</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>ApplicationXPath</AttributeName>
<Path>SOFTWARE\OpsMgrSamples\ApplicationX\Path</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
</ProbeAction>
</Task>
This results in the following data item:
<DataItem type="Microsoft.Windows.RegistryData" time="2008-10-08T13:08:26.9989812-07:00" sourceHealthServiceId="B0BE86FA-56AD-1F2E-EE87-8DF72FC53818">
<Values>
<ApplicationXExists VariantType="11" Type="Boolean">true</ApplicationXExists>
<ApplicationXPath VariantType="8">c:\ApplicationX</ApplicationXPath>
<ApplicationXVersion VariantType="8">2.0</ApplicationXVersion>
</Values>
</DataItem>
Information
Module Type |
|
Input Type |
None |
Output Type |
|
Implementation |
Native |
Library |
Microsoft.Windows.Library |