IIS 8 Server Role Version Discovery

Microsoft.Windows.InternetInformationServices.6.2.ServerRoleVersion.Discovery.Rule (Discovery)

This rule runs on every IIS 8 Web Server to detect the exact version information. It discovers the MajorVersion and MinorVersion property values.

Knowledge Base article:

Summary

This rule runs against every Windows Server 2012 computer and checks whether IIS 8 is installed.

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.6.2.ServerRole
EnabledTrue
Frequency14400
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DiscoveryDataSource DataSource Microsoft.Windows.FilteredRegistryDiscoveryProvider System.PrivilegedMonitoringAccount

Source Code:

<Discovery ID="Microsoft.Windows.InternetInformationServices.6.2.ServerRoleVersion.Discovery.Rule" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.6.2.ServerRole" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.Windows.InternetInformationServices.6.2.ServerRole">
<Property TypeID="IISCommon!Microsoft.Windows.InternetInformationServices.ServerRole" PropertyID="MinorVersion"/>
<Property TypeID="IISCommon!Microsoft.Windows.InternetInformationServices.ServerRole" PropertyID="MajorVersion"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DiscoveryDataSource" RunAs="System!System.PrivilegedMonitoringAccount" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<RegistryAttributeDefinitions>
<RegistryAttributeDefinition>
<AttributeName>IIS_INSTALLED</AttributeName>
<Path>SOFTWARE\MICROSOFT\InetStp\InstallPath</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>IIS_MAJOR_VERSION</AttributeName>
<Path>SOFTWARE\MICROSOFT\InetStp\MajorVersion</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>IIS_MINOR_VERSION</AttributeName>
<Path>SOFTWARE\MICROSOFT\InetStp\MinorVersion</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
<Frequency>14400</Frequency>
<ClassId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.6.2.ServerRole"]$</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="IISCommon!Microsoft.Windows.InternetInformationServices.ServerRole"]/MajorVersion$</Name>
<Value>$Data/Values/IIS_MAJOR_VERSION$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="IISCommon!Microsoft.Windows.InternetInformationServices.ServerRole"]/MinorVersion$</Name>
<Value>$Data/Values/IIS_MINOR_VERSION$</Value>
</Setting>
</Settings>
</InstanceSettings>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>Values/IIS_INSTALLED</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>.+</Pattern>
</RegExExpression>
</Expression>
</DataSource>
</Discovery>