IDesignatedBDC Method: SetDesignatedBDCsForDomain

DomainName  As String,
DesignatedBDCList As Variant


[in] String DomainName
Name of the domain for which the list of the designated Backup Domain Controllers (BDCs) is to be set.

[in] VARIANT DesignatedBDCList
List of the BDCs to be set as designated for lookups and other operations.

Sets the list of BDCs to be used for lookups and other operations for the given domain. A validation is done to ensure that BDCs with the specified name exist for the domain. If any of the BDCs is invalid, an error is returned. By default, this list of BDCs is not used unless the USE_BDC flag is set to TRUE for the specified domain. In case a BDC is not available, the next BDC in the list is used for lookups. 


Dim DesignatedBDCs As Variant
Dim DBDCObj As IDesignatedBDC
Set DBDCObj = GetObject("NTDS:")
'Set the BDC1 and BDC2 as the designated BDCs for the domain "DomainName"
DesignatedBDCs = Array("BDC1", "BDC2")
DBDCObj.SetDesignatedBDCsForDomain "DomainName", DesignatedBDCs
'Set the flag UseBDC to TRUE for the domain "DomainName"
DBDCObj.UseDesignatedBDCs ("DomainName")= True


See Also