Forest.FindGlobalCatalog Method

Definition

Finds a single global catalog in this forest.

Overloads

FindGlobalCatalog()

Finds any global catalog in this forest.

FindGlobalCatalog(LocatorOptions)

Finds a global catalog in this forest for a specified location criteria.

FindGlobalCatalog(String)

Finds a global catalog in this forest for a specified site.

FindGlobalCatalog(String, LocatorOptions)

Finds a global catalog in this forest for a specified site and location criteria.

FindGlobalCatalog()

Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs

Finds any global catalog in this forest.

C#
public System.DirectoryServices.ActiveDirectory.GlobalCatalog FindGlobalCatalog();

Returns

A GlobalCatalog of this Forest.

Exceptions

A global catalog cannot be located.

A call to the underlying directory service resulted in an error.

The object has been disposed.

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

FindGlobalCatalog(LocatorOptions)

Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs

Finds a global catalog in this forest for a specified location criteria.

C#
public System.DirectoryServices.ActiveDirectory.GlobalCatalog FindGlobalCatalog(System.DirectoryServices.ActiveDirectory.LocatorOptions flag);

Parameters

flag
LocatorOptions

A LocatorOptions value specifying the location criteria.

Returns

A GlobalCatalog object for the specified location criteria.

Exceptions

A global catalog cannot be located.

A call to the underlying directory service resulted in an error.

The object has been disposed.

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

FindGlobalCatalog(String)

Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs

Finds a global catalog in this forest for a specified site.

C#
public System.DirectoryServices.ActiveDirectory.GlobalCatalog FindGlobalCatalog(string siteName);

Parameters

siteName
String

The name of the site to search.

Returns

A GlobalCatalog object for the specified site.

Exceptions

A global catalog cannot be located.

A call to the underlying directory service resulted in an error.

siteName is an empty string.

siteName is null.

The object has been disposed.

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

FindGlobalCatalog(String, LocatorOptions)

Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs
Source:
Forest.cs

Finds a global catalog in this forest for a specified site and location criteria.

C#
public System.DirectoryServices.ActiveDirectory.GlobalCatalog FindGlobalCatalog(string siteName, System.DirectoryServices.ActiveDirectory.LocatorOptions flag);

Parameters

siteName
String

The name of the site to search.

flag
LocatorOptions

A LocatorOptions value that specifies the location criteria.

Returns

A GlobalCatalog object for the specified site and location criteria.

Exceptions

A global catalog cannot be located.

A call to the underlying directory service resulted in an error.

siteName is an empty string.

siteName is null.

The object has been disposed.

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