LDAP Discovery and Agent Installation

Microsoft.SystemCenter.Essentials.LDAPDiscoveryAndAgentInstallation (WriteActionModuleType)

This module discovers and installs agent in the domain.

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityInternal
RunAsDefault
InputTypeSystem.BaseData

Member Modules:

ID Module Type TypeId RunAs 
Probe ProbeAction Microsoft.Windows.LdapProbe Default
Verifier ProbeAction Microsoft.SystemCenter.ComputerVerifier Default
FilterOU ConditionDetection System.ExpressionFilter Default
LicenseCountCheck ConditionDetection Microsoft.SystemCenter.Essentials.LicenseCountCheckConditionDetection Default
Mapper ConditionDetection System.Discovery.ClassSnapshotDataMapper Default
WA WriteAction Microsoft.SystemCenter.AgentManagement.PushInstallAction Default

Overrideable Parameters:

IDParameterTypeSelector
OUListstring$Config/OUList$
Verifybool$Config/Verify$

Source Code:

<WriteActionModuleType ID="Microsoft.SystemCenter.Essentials.LDAPDiscoveryAndAgentInstallation" Accessibility="Internal">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.Discovery.MapperSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Domain" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Query" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UserAndDomain" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Password" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="OUList" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Verify" type="xsd:boolean"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ComputerType" type="xsd:integer"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="OUList" Selector="$Config/OUList$" ParameterType="string"/>
<OverrideableParameter ID="Verify" Selector="$Config/Verify$" ParameterType="bool"/>
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<!-- Find all computers using LDAP query -->
<ProbeAction ID="Probe" TypeID="Windows!Microsoft.Windows.LdapProbe">
<Domain>$Config/Domain$</Domain>
<Query>$Config/Query$</Query>
<Params>
<Param>dNSHostName</Param>
<Param>distinguishedName</Param>
<Param>operatingSystem</Param>
</Params>
<UserAndDomain/>
<Password/>
</ProbeAction>
<!-- Verify the computers before starting installation -->
<ProbeAction ID="Verifier" TypeID="Microsoft.SystemCenter.ComputerVerifier">
<Verify>$Config/Verify$</Verify>
<ComputerNames>$Data/Property[@Name='dNSHostName']$</ComputerNames>
<ComputerType>$Config/ComputerType$</ComputerType>
</ProbeAction>
<!-- Filter out computers for given OU list. Make sure OU list is separated by or symbol "|",
and OU names should be checked for special charaters used in RegEx
Also make sure that the ordering of OUs is such that longest OU name is first and shortest OU name
is last. This will avoid the problem of "The Regex Engine is Eager"
-->
<ConditionDetection ID="FilterOU" TypeID="System!System.ExpressionFilter">
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='distinguishedName']</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>($Config/OUList$)</Pattern>
</RegExExpression>
</Expression>
</ConditionDetection>
<!-- Limit the number of computers to maximum license count-->
<ConditionDetection ID="LicenseCountCheck" TypeID="Microsoft.SystemCenter.Essentials.LicenseCountCheckConditionDetection"/>
<!-- A condition detection module that maps any type of data to class type instance System.Discovery.Data data.-->
<ConditionDetection ID="Mapper" TypeID="System!System.Discovery.ClassSnapshotDataMapper">
<ClassId>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</ClassId>
<InstanceSettings>
<Settings>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
<Value>$Data/Property[@Name='dNSHostName']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/NetworkName$</Name>
<Value>$Data/Property[@Name='dNSHostName']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/DNSName$</Name>
<Value>$Data/Property[@Name='dNSHostName']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/NetbiosDomainName$</Name>
<Value>$Data/Property[@Name='VerifiedNetBiosDomainName']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/IPAddress$</Name>
<Value>$Data/Property[@Name='VerifiedIPAddress']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$</Name>
<Value>$Data/Property[@Name='VerifiedNetBiosName']$</Value>
</Setting>
</Settings>
</InstanceSettings>
</ConditionDetection>
<!-- Install the agents on newly discovered & verified computers -->
<WriteAction ID="WA" TypeID="SCInternal!Microsoft.SystemCenter.AgentManagement.PushInstallAction">
<SDKServerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</SDKServerName>
<ManagementServerHostId>$Target/Host/Id$</ManagementServerHostId>
<TaskTimeoutSeconds>600</TaskTimeoutSeconds>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="WA">
<Node ID="Mapper">
<Node ID="LicenseCountCheck">
<Node ID="Verifier">
<Node ID="FilterOU">
<Node ID="Probe"/>
</Node>
</Node>
</Node>
</Node>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>