Child Site Discovery Datasource

MECM.ChildSite.Discovery.DS (DataSourceModuleType)

This data source finds the ConfigMgr primary site and secondary site.

Element properties:

TypeDataSourceModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
OutputTypeSystem.Discovery.Data

Member Modules:

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

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
Frequencyint$Config/Frequency$Frequency (Seconds)

Source Code:

<DataSourceModuleType ID="MECM.ChildSite.Discovery.DS" Accessibility="Public" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="ComputerName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="Frequency" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="ClassId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="SiteType" type="xsd:integer"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
<ComputerName>$Config/ComputerName$</ComputerName>
<RegistryAttributeDefinitions>
<RegistryAttributeDefinition>
<AttributeName>Identification</AttributeName>
<Path>SOFTWARE\Microsoft\SMS\Identification</Path>
<PathType>0</PathType>
<AttributeType>0</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>SiteType</AttributeName>
<Path>SOFTWARE\Microsoft\SMS\Identification\Site Type</Path>
<PathType>1</PathType>
<AttributeType>2</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>ParentSiteCode</AttributeName>
<Path>SOFTWARE\Microsoft\SMS\Identification\Parent Site Code</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>Version</AttributeName>
<Path>SOFTWARE\Microsoft\SMS\Full Version</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>SiteCode</AttributeName>
<Path>SOFTWARE\Microsoft\SMS\Identification\Site Code</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>Domain</AttributeName>
<Path>SOFTWARE\Microsoft\SMS\Identification\Domain</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>Server</AttributeName>
<Path>SOFTWARE\Microsoft\SMS\Identification\Server</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>SiteName</AttributeName>
<Path>SOFTWARE\Microsoft\SMS\Identification\Site Name</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
<Frequency>$Config/Frequency$</Frequency>
<ClassId>$Config/ClassId$</ClassId>
<InstanceSettings>
<Settings>
<Setting>
<Name>$MPElement[Name="MECM.Site"]/SiteServer$</Name>
<Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="MECM.Site"]/SiteCode$</Name>
<Value>$Data/Values/SiteCode$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="MECM.Site"]/ParentSiteCode$</Name>
<Value>$Data/Values/ParentSiteCode$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="MECM.Site"]/Version$</Name>
<Value>$Data/Values/Version$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="MECM.Site"]/SiteType$</Name>
<Value>$Config/SiteType$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="MECM.Site"]/Domain$</Name>
<Value>$Data/Values/Domain$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="MECM.Site"]/SiteName$</Name>
<Value>$Data/Values/SiteName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
<Value>$Data/Values/SiteCode$</Value>
</Setting>
</Settings>
</InstanceSettings>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Values/SiteType</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">$Config/SiteType$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Values/ParentSiteCode</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String"/>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</MemberModules>
<Composition>
<Node ID="DS"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>