Web Sites Management Server Role Instance Discovery.

Microsoft.WebSites.ManagementServer.Discovery (Discovery)

Registry Discovery to discover Web Sites Management Server Role Instance.

Knowledge Base article:

Summary

Registry Discovery to discover Web Sites Management Server role instance class.

Element properties:

TargetMicrosoft.Windows.Server.Computer
EnabledTrue
Frequency14400
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.WebSites.ManagementServer.Discovery" Target="Windows!Microsoft.Windows.Server.Computer" Enabled="true" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.WebSites.ManagementServer">
<Property TypeID="Microsoft.WebSites.RoleInstance" PropertyID="Name"/>
<Property TypeID="Microsoft.WebSites.RoleInstance" PropertyID="ServiceName"/>
<Property TypeID="Microsoft.WebSites.RoleInstance" PropertyID="Version"/>
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
<ComputerName>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<RegistryAttributeDefinitions>
<RegistryAttributeDefinition>
<!-- In Management Server Roles we install the Controller Feature from Web Hosting Framework -->
<AttributeName>HasControllerFeatureInstalled</AttributeName>
<Path>SOFTWARE\Microsoft\IIS Extensions\Web Hosting Framework\Controller</Path>
<!--
PathType
0 Key. Path is full path to the key.
1 Value of specified registry key. Path includes name of the value.
2 Default value of specified registry key. Path is full path to the key.
-->
<PathType>1</PathType>
<!--
AttributeType
0 Boolean: used when checking existence of the key or value.
1 String: converting result value to string if possible.
2 Integer: converting result value to number if possible.
3 Float: converting result value to float.
-->
<AttributeType>2</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>IsControllerRole</AttributeName>
<Path>SOFTWARE\Microsoft\IIS Extensions\Web Hosting Framework\OnPremFarmController</Path>
<!--
PathType
0 Key. Path is full path to the key.
1 Value of specified registry key. Path includes name of the value.
2 Default value of specified registry key. Path is full path to the key.
-->
<PathType>1</PathType>
<!--
AttributeType
0 Boolean: used when checking existence of the key or value.
1 String: converting result value to string if possible.
2 Integer: converting result value to number if possible.
3 Float: converting result value to float.
-->
<AttributeType>2</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>StampName</AttributeName>
<Path>SOFTWARE\Microsoft\IIS Extensions\Web Hosting Framework\StampName</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>Version</AttributeName>
<Path>SOFTWARE\Microsoft\IIS Extensions\Web Hosting Framework\Version</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
<!-- 14400s: 4 hrs -->
<Frequency>14400</Frequency>
<ClassId>$MPElement[Name="Microsoft.WebSites.ManagementServer"]$</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="Microsoft.WebSites.RoleInstance"]/Name$</Name>
<Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Microsoft.WebSites.RoleInstance"]/ServiceName$</Name>
<Value>$Data/Values/StampName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Microsoft.WebSites.RoleInstance"]/Version$</Name>
<Value>$Data/Values/Version$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
<Value>Web Sites Management Server ($Data/Values/Version$)</Value>
</Setting>
</Settings>
</InstanceSettings>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Values/HasControllerFeatureInstalled</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">1</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Values/IsControllerRole</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="Integer">1</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</Discovery>