GetBDCsForDomain
(
DomainName As String
) As Variant;
Parameters
[in] String DomainName
Name of the domain for which the list of Backup Domain Controllers
(BDCs) is to be obtained.
Description
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.
Example
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
Next
See Also: