IDesignatedBDC Method: GetBDCsForDomain

 DomainName As String
) As Variant;


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

Gets the list of all BDCs for the specified domain. This method works even if the Primary Domain Controller (PDC) of the domain is not functioning.

Return Values
Variant array containing the list of BDCs for the specified domain.


Dim AllBDCs As Variant
Dim BDC As Variant
Dim DBDCObj As IDesignatedBDC
Set DBDCObj = GetObject("NTDS:")
'Get all the BDCs for the domain "DomainName"
AllBDCs = DBDCObj.GetBDCsForDomain("DomainName")
'Print all these BDCs
For each BDC in AllBDCs
 Debug.Print BDC


See Also: