GlobalCatalog.FindAllProperties Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Retrieves all of the Active Directory Domain Services properties that are stored on this global catalog server.

Namespace:   System.DirectoryServices.ActiveDirectory
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllProperties()

Return Value

Type: System.DirectoryServices.ActiveDirectory.ReadOnlyActiveDirectorySchemaPropertyCollection

A ReadOnlyActiveDirectorySchemaPropertyCollection object that contains the Active Directory Domain Services properties that are stored on this global catalog server.

Exception Condition
InvalidOperationException

The domain controller is not a global catalog server or the global catalog server has been disabled.

ObjectDisposedException

The current object has been disposed.

The following C# example shows how to enumerate the global catalog servers in the specified DirectoryContext object and print the common name of each property stored on each global catalog server to the standard console.


foreach (GlobalCatalog gc in GlobalCatalog.FindAll(context))
{
    Console.WriteLine(gc.Name);

    foreach (ActiveDirectorySchemaProperty prop in gc.FindAllProperties())
    {
        Console.WriteLine(prop.CommonName);
    }
}

.NET Framework
Available since 2.0
Return to top
Show: