Discover iSCSI target on Windows Storage Server 2008 R2

Microsoft.Windows.FileServer.Service.iSCSITarget.2008R2.Discovery (Discovery)

Discovers an instance of the iSCSI Target class when the the iSCSI Target feature is installed

Knowledge Base article:

Summary

This discovery rule discovers an instance of the iSCSI Target service where it is installed. The rule is targeted to the Windows Server 2008 R2 File Services role and will only run on servers that have the File Services role enabled and discovered. The iSCSI Target is shipped as part of the Windows Storage Server 2008 R2 release.

Element properties:

TargetMicrosoft.Windows.FileServer.2008R2
EnabledTrue
Frequency14500
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.FilteredRegistryDiscoveryProvider Default

Source Code:

<Discovery ID="Microsoft.Windows.FileServer.Service.iSCSITarget.2008R2.Discovery" Enabled="true" Target="FileServicesR2!Microsoft.Windows.FileServer.2008R2" Remotable="true">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.Windows.FileServer.Service.iSCSITarget.2008R2"/>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<RegistryAttributeDefinitions>
<RegistryAttributeDefinition>
<AttributeName>iSCSITargetExist</AttributeName>
<Path>Software\Microsoft\iSCSI Target</Path>
<PathType>0</PathType>
<AttributeType>0</AttributeType>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
<Frequency>14500</Frequency>
<ClassId>$MPElement[Name="Microsoft.Windows.FileServer.Service.iSCSITarget.2008R2"]$</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='iSCSILib!Microsoft.Windows.FileServer.Service.iSCSITarget.Base']/IQN$</Name>
<Value>iqn.1991-05.com.microsoft:$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name='System!System.Entity']/DisplayName$</Name>
<Value>$Target/Property[Type='System!System.Entity']/DisplayName$ (iSCSI Target)</Value>
</Setting>
</Settings>
</InstanceSettings>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Values/iSCSITargetExist</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</DataSource>
</Discovery>