DomainController.FindOne 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 a single domain controller.
FindOne(DirectoryContext) |
Finds a single domain controller in the specified context. |
FindOne(DirectoryContext, LocatorOptions) |
Finds a single domain controller in the specified context, allowing for additional search options. |
FindOne(DirectoryContext, String) |
Finds a single domain controller in the specified context and site. |
FindOne(DirectoryContext, String, LocatorOptions) |
Finds a single domain controller in the specified context and site, allowing for additional search options. |
- Source:
- DomainController.cs
- Source:
- DomainController.cs
- Source:
- DomainController.cs
- Source:
- DomainController.cs
Finds a single domain controller in the specified context.
public:
static System::DirectoryServices::ActiveDirectory::DomainController ^ FindOne(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context);
public static System.DirectoryServices.ActiveDirectory.DomainController FindOne (System.DirectoryServices.ActiveDirectory.DirectoryContext context);
static member FindOne : System.DirectoryServices.ActiveDirectory.DirectoryContext -> System.DirectoryServices.ActiveDirectory.DomainController
Public Shared Function FindOne (context As DirectoryContext) As DomainController
Parameters
- context
- DirectoryContext
A DirectoryContext object that contains the target and credentials to use for the search.
Returns
A DomainController object that represents the domain controller that was found by the search.
Exceptions
No domain controller was found.
context
is null
.
See also
Applies to
.NET 9 (package-provided) والإصدارات الأخرى
منتج | الإصدارات |
---|---|
.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:
- DomainController.cs
- Source:
- DomainController.cs
- Source:
- DomainController.cs
- Source:
- DomainController.cs
Finds a single domain controller in the specified context, allowing for additional search options.
public:
static System::DirectoryServices::ActiveDirectory::DomainController ^ FindOne(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context, System::DirectoryServices::ActiveDirectory::LocatorOptions flag);
public static System.DirectoryServices.ActiveDirectory.DomainController FindOne (System.DirectoryServices.ActiveDirectory.DirectoryContext context, System.DirectoryServices.ActiveDirectory.LocatorOptions flag);
static member FindOne : System.DirectoryServices.ActiveDirectory.DirectoryContext * System.DirectoryServices.ActiveDirectory.LocatorOptions -> System.DirectoryServices.ActiveDirectory.DomainController
Public Shared Function FindOne (context As DirectoryContext, flag As LocatorOptions) As DomainController
Parameters
- context
- DirectoryContext
A DirectoryContext object that contains the target and credentials to use for the search.
- flag
- LocatorOptions
A combination of one or more of the LocatorOptions members that defines the type of domain controller to find.
Returns
A DomainController object that represents the domain controller that was found by the search.
Exceptions
No domain controller was found.
context
or flag
is not valid.
context
is null
.
See also
Applies to
.NET 9 (package-provided) والإصدارات الأخرى
منتج | الإصدارات |
---|---|
.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:
- DomainController.cs
- Source:
- DomainController.cs
- Source:
- DomainController.cs
- Source:
- DomainController.cs
Finds a single domain controller in the specified context and site.
public:
static System::DirectoryServices::ActiveDirectory::DomainController ^ FindOne(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context, System::String ^ siteName);
public static System.DirectoryServices.ActiveDirectory.DomainController FindOne (System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteName);
static member FindOne : System.DirectoryServices.ActiveDirectory.DirectoryContext * string -> System.DirectoryServices.ActiveDirectory.DomainController
Public Shared Function FindOne (context As DirectoryContext, siteName As String) As DomainController
Parameters
- context
- DirectoryContext
A DirectoryContext object that contains the target and credentials to use for the search.
- siteName
- String
The name of the site to search for a domain controller.
Returns
A DomainController object that represents the domain controller that was found by the search.
Exceptions
No domain controller was found.
context
or siteName
is not valid.
context
or siteName
is null
.
See also
Applies to
.NET 9 (package-provided) والإصدارات الأخرى
منتج | الإصدارات |
---|---|
.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:
- DomainController.cs
- Source:
- DomainController.cs
- Source:
- DomainController.cs
- Source:
- DomainController.cs
Finds a single domain controller in the specified context and site, allowing for additional search options.
public:
static System::DirectoryServices::ActiveDirectory::DomainController ^ FindOne(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context, System::String ^ siteName, System::DirectoryServices::ActiveDirectory::LocatorOptions flag);
public static System.DirectoryServices.ActiveDirectory.DomainController FindOne (System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteName, System.DirectoryServices.ActiveDirectory.LocatorOptions flag);
static member FindOne : System.DirectoryServices.ActiveDirectory.DirectoryContext * string * System.DirectoryServices.ActiveDirectory.LocatorOptions -> System.DirectoryServices.ActiveDirectory.DomainController
Public Shared Function FindOne (context As DirectoryContext, siteName As String, flag As LocatorOptions) As DomainController
Parameters
- context
- DirectoryContext
A DirectoryContext object that contains the target and credentials to use for the search.
- siteName
- String
The name of the site to search for a domain controller.
- flag
- LocatorOptions
A combination of one or more of the LocatorOptions members that defines the type of domain controller to find.
Returns
A DomainController object that represents the domain controller that was found by the search.
Exceptions
No domain controller was found.
context
, siteName
, or flag
is not valid.
context
or siteName
is null
.
See also
Applies to
.NET 9 (package-provided) والإصدارات الأخرى
منتج | الإصدارات |
---|---|
.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
.NET هو مشروع مصدر مفتوح. حدد رابطًا لتقديم الملاحظات: