GlobalCatalog.FindOne Method

Definition

Finds a single global catalog server.

Overloads

FindOne(DirectoryContext)

Finds a single global catalog server in the specified context.

FindOne(DirectoryContext, LocatorOptions)

Finds a single global catalog server in the specified context, allowing for additional search options.

FindOne(DirectoryContext, String)

Finds a single global catalog server in the specified context and site.

FindOne(DirectoryContext, String, LocatorOptions)

Finds a single global catalog server in the specified context and site, allowing for additional search options.

FindOne(DirectoryContext)

Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs

Finds a single global catalog server in the specified context.

C#
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog FindOne(System.DirectoryServices.ActiveDirectory.DirectoryContext context);

Parameters

context
DirectoryContext

A DirectoryContext object that contains the target and credentials to use for the search.

Returns

A GlobalCatalog object that represents the global catalog server found by the search.

Exceptions

No global catalog server was found.

context is not valid.

context is null.

See also

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (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, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

FindOne(DirectoryContext, LocatorOptions)

Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs

Finds a single global catalog server in the specified context, allowing for additional search options.

C#
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog FindOne(System.DirectoryServices.ActiveDirectory.DirectoryContext context, System.DirectoryServices.ActiveDirectory.LocatorOptions flag);

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 global catalog server to find.

Returns

A GlobalCatalog object that represents the global catalog server found by the search.

Exceptions

No global catalog server was found.

context or flag is not valid.

context is null.

See also

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (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, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

FindOne(DirectoryContext, String)

Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs

Finds a single global catalog server in the specified context and site.

C#
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog FindOne(System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteName);

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 global catalog server.

Returns

A GlobalCatalog object that represents the global catalog server found by the search.

Exceptions

No global catalog server was found.

context or siteName is not valid.

context or siteName is null.

See also

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (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, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

FindOne(DirectoryContext, String, LocatorOptions)

Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs
Source:
GlobalCatalog.cs

Finds a single global catalog server in the specified context and site, allowing for additional search options.

C#
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog FindOne(System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteName, System.DirectoryServices.ActiveDirectory.LocatorOptions flag);

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 global catalog server.

flag
LocatorOptions

A combination of one or more of the LocatorOptions members that defines the type of global catalog server to find.

Returns

A GlobalCatalog object that represents the global catalog server found by the search.

Exceptions

No global catalog server was found.

context, siteName, or flag is not valid.

context or siteName is null.

See also

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (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, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10