DomainController.FindOne Method (DirectoryContext, String, LocatorOptions)
Finds a single domain controller in the specified context and site, allowing for additional search options.
Assembly: System.DirectoryServices (in System.DirectoryServices.dll)
Public Shared Function FindOne ( context As DirectoryContext, siteName As String, flag As LocatorOptions ) As DomainController
A DirectoryContext object that contains the target and credentials to use for the search.
The name of the site to search for a domain controller.
A combination of one or more of the LocatorOptions members that defines the type of domain controller to find.
Return ValueType: System.DirectoryServices.ActiveDirectory.DomainController
A DomainController object that represents the domain controller that was found by the search.
Available since 2.0