Forest Class

The Forest class represents an Active Directory Domain Services forest.

System.Object
  System.DirectoryServices.ActiveDirectory.Forest

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

[DirectoryServicesPermissionAttribute(SecurityAction.LinkDemand, Unrestricted = true)]
public class Forest : IDisposable

The Forest type exposes the following members.

  NameDescription
Public propertyApplicationPartitionsGets a collection of all application partitions in the forest.
Public propertyDomainsGets a collection of all domains in the forest.
Public propertyForestModeGets the operating mode of the forest.
Public propertyGlobalCatalogsGets a collection of all global catalogs in the forest.
Public propertyNameGets the name of the forest.
Public propertyNamingRoleOwnerGets the domain controller that holds the FSMO naming master role for the forest.
Public propertyRootDomainGets the first domain that was created in a forest.
Public propertySchemaGets the schema of the forest.
Public propertySchemaRoleOwnerGets the domain controller that holds the FSMO schema master role for the forest.
Public propertySitesGets a collection of sites that are contained in the forest.
Top

  NameDescription
Public methodCreateLocalSideOfTrustRelationshipCreates the local side of a trust relationship with the specified forest.
Public methodCreateTrustRelationshipCreates both sides of a trust relationship with the specified forest.
Public methodDeleteLocalSideOfTrustRelationshipDeletes the local side of a trust relationship.
Public methodDeleteTrustRelationshipDeletes both sides of a trust relationship.
Public methodDispose()Releases all managed and unmanaged resources that are held by the object.
Protected methodDispose(Boolean)Releases the managed resources that are used by the object and, optionally, releases unmanaged resources.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFindAllDiscoverableGlobalCatalogs()Finds all of the discoverable global catalogs in this forest.
Public methodFindAllDiscoverableGlobalCatalogs(String)Finds all of the discoverable global catalogs in this forest in a specified site.
Public methodFindAllGlobalCatalogs()Finds all the global catalogs in this forest.
Public methodFindAllGlobalCatalogs(String)Finds all the global catalogs in this forest for a given site.
Public methodFindGlobalCatalog()Finds any global catalog in this forest.
Public methodFindGlobalCatalog(LocatorOptions)Finds a global catalog in this forest for a specified location criteria.
Public methodFindGlobalCatalog(String)Finds a global catalog in this forest for a specified site.
Public methodFindGlobalCatalog(String, LocatorOptions)Finds a global catalog in this forest for a specified site and location criteria.
Public methodGetAllTrustRelationshipsGets a collection of the trust relationships of the current forest.
Public methodStatic memberGetCurrentForestGets a Forest object for the current user context.
Public methodStatic memberGetForestGets a Forest object for the specified context.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetSelectiveAuthenticationStatusGets a Boolean value that indicates whether selective authentication is enabled on the inbound trust relationship with the specified forest. true if selective authentication is enabled; otherwise, false. For more information, see the Remarks section.
Public methodGetSidFilteringStatusGets the SID filtering status of a trust.
Public methodGetTrustRelationshipGets the trust relationship between this forest and the specified forest.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRaiseForestFunctionalityRaises the mode of operation for the forest.
Public methodRepairTrustRelationshipRepairs a trust relationship.
Public methodSetSelectiveAuthenticationStatusEnables or disables selective authentication for an inbound trust.
Public methodSetSidFilteringStatusSets the SID filtering state with the specified forest.
Public methodToStringReturns a string representation of the current forest. (Overrides Object.ToString().)
Public methodUpdateLocalSideOfTrustRelationship(String, String)Updates the password for the local side of a trust relationship.
Public methodUpdateLocalSideOfTrustRelationship(String, TrustDirection, String)Updates the password and trust direction for the local side of a trust relationship.
Public methodUpdateTrustRelationshipUpdates the trust direction for a trust relationship. The trust directions are updated on both sides of the trust.
Public methodVerifyOutboundTrustRelationshipVerifies that a previously established outbound trust with the specified forest is valid.
Public methodVerifyTrustRelationshipVerifies that a previously established trust with the specified forest is valid.
Top

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft