DomainName As String
) As Variant;
[in] String DomainName
Name of the domain for which the list of designated Backup Domain Controllers (BDCs) is to be obtained.
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.
Variant array containing the list of designated BDCs for the specified domain.
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