Domain.FindAllDiscoverableDomainControllers Method

Definition

Finds all of the discoverable domain controllers in this domain.

Overloads

FindAllDiscoverableDomainControllers(String)

Finds all of the discoverable domain controllers in this domain that are also in the specified site.

FindAllDiscoverableDomainControllers()

Finds all of the discoverable domain controllers in this domain.

FindAllDiscoverableDomainControllers(String)

Source:
Domain.cs
Source:
Domain.cs
Source:
Domain.cs

Finds all of the discoverable domain controllers in this domain that are also in the specified site.

C#
public System.DirectoryServices.ActiveDirectory.DomainControllerCollection FindAllDiscoverableDomainControllers (string siteName);

Parameters

siteName
String

The name of the site to search for the domain controllers.

Returns

A DomainControllerCollection that contains the domain controller objects that were found by this method.

Exceptions

The target server is either busy or unavailable.

siteName is an empty string.

siteName is null.

The object has been disposed.

Remarks

You can find discoverable domain controllers by querying DNS SRV records. If a domain controller does not register an SRV record for the specified site, it will not be returned by this method, even if the domain controller is physically located within that site.

All domain controllers that register an SRV record for the specified site will be returned by this method, even if they are not physically located within that site.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

FindAllDiscoverableDomainControllers()

Source:
Domain.cs
Source:
Domain.cs
Source:
Domain.cs

Finds all of the discoverable domain controllers in this domain.

C#
public System.DirectoryServices.ActiveDirectory.DomainControllerCollection FindAllDiscoverableDomainControllers ();

Returns

A DomainControllerCollection that contains the domain controller objects that were found by this method.

Exceptions

The target server is either busy or unavailable.

The object has been disposed.

Remarks

You can find discoverable domain controllers by querying DNS SRV records. Only those domain controllers that register the generic, non-site-specific, domain controller SRV record will be returned by this method.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9