Domain.FindAllDiscoverableDomainControllers Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds all of the discoverable domain controllers in this domain.
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. |
- 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.
public:
System::DirectoryServices::ActiveDirectory::DomainControllerCollection ^ FindAllDiscoverableDomainControllers(System::String ^ siteName);
public System.DirectoryServices.ActiveDirectory.DomainControllerCollection FindAllDiscoverableDomainControllers (string siteName);
member this.FindAllDiscoverableDomainControllers : string -> System.DirectoryServices.ActiveDirectory.DomainControllerCollection
Public Function FindAllDiscoverableDomainControllers (siteName As String) As DomainControllerCollection
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 |
- Source:
- Domain.cs
- Source:
- Domain.cs
- Source:
- Domain.cs
Finds all of the discoverable domain controllers in this domain.
public:
System::DirectoryServices::ActiveDirectory::DomainControllerCollection ^ FindAllDiscoverableDomainControllers();
public System.DirectoryServices.ActiveDirectory.DomainControllerCollection FindAllDiscoverableDomainControllers ();
member this.FindAllDiscoverableDomainControllers : unit -> System.DirectoryServices.ActiveDirectory.DomainControllerCollection
Public Function FindAllDiscoverableDomainControllers () As DomainControllerCollection
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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: