GetDesignatedBDCsForDomain
DomainName As String
) As Variant;
Parameters
[in] String DomainName
Name of the domain for which the list of designated Backup Domain
Controllers (BDCs) is to be obtained.
Description
Gets the list of designated BDCs for the specified domain. These
BDCs are used for lookups and other operations. The lookup is done
in the order in which the BDCs appear in the list. If the first BDC
is not functioning, the next is tried and so on till either a
functioning BDC is found or the list is completed.
Return Values
Variant array containing the list of designated BDCs for the
specified domain.
Example
Dim AllDBDCs As Variant
Dim DBDC As Variant
Dim DBDCObj As IDesignatedBDC
Set DBDCObj = GetObject("NTDS:")
'Get the designated BDCs list for the domain "DomainName"
AllDBDCs = DBDCObj. GetDesignatedBDCsForDomain ("DomainName")
'Print all the BDCs in the designated list.
For each DBDC in AllDBDCs
Debug.Print DBDC
Next
See Also: