Domain Class

The Domain class represents an Active Directory domain.

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

[DirectoryServicesPermissionAttribute(SecurityAction.LinkDemand, Unrestricted = true)]
public class Domain : ActiveDirectoryPartition

The Domain type exposes the following members.

  NameDescription
Public propertyChildrenGets the domains that are children of this domain.
Public propertyDomainControllersGets the domain controllers in this domain.
Public propertyDomainModeGets the mode that this domain is operating in.
Public propertyForestGets the forest that this domain is a member of.
Public propertyInfrastructureRoleOwnerGets the infrastructure role owner for this domain.
Public propertyNameGets the partition name. (Inherited from ActiveDirectoryPartition.)
Public propertyParentGets the parent domain of this domain.
Public propertyPdcRoleOwnerGets the DomainController object that holds the primary domain controller (PDC) for this domain.
Public propertyRidRoleOwnerGets the RID master role holder for this domain.
Top

  NameDescription
Public methodCreateLocalSideOfTrustRelationshipCreates the local side of a trust relationship with the specified domain.
Public methodCreateTrustRelationshipCreates both sides of a trust relationship with the specified domain.
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. (Inherited from ActiveDirectoryPartition.)
Protected methodDispose(Boolean)Releases the managed resources that are used by the object and, optionally, releases unmanaged resources. (Inherited from ActiveDirectoryPartition.)
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 methodFindAllDiscoverableDomainControllers()Finds all of the discoverable domain controllers in this domain.
Public methodFindAllDiscoverableDomainControllers(String)Finds all of the discoverable domain controllers in this domain that are also in the specified site.
Public methodFindAllDomainControllers()Finds all of the domain controllers in this domain.
Public methodFindAllDomainControllers(String)Finds all of the domain controllers in this domain that are also in the specified site.
Public methodFindDomainController()Finds any domain controller in this domain.
Public methodFindDomainController(LocatorOptions)Finds a domain controller in this domain that meets the specified criteria.
Public methodFindDomainController(String)Finds a domain controller in this domain and in the specified site.
Public methodFindDomainController(String, LocatorOptions)Finds a domain controller in this domain and in the specified site that meets the specified criteria.
Public methodGetAllTrustRelationshipsRetrieves all of the trust relationships for this domain.
Public methodStatic memberGetComputerDomainGets the Domain object that represents the domain to which the local computer is joined.
Public methodStatic memberGetCurrentDomainGets the Domain object for the current user credentials in effect for the security context under which the application is running.
Public methodGetDirectoryEntryRetrieves a DirectoryEntry object that represents the default naming context of the domain. (Overrides ActiveDirectoryPartition.GetDirectoryEntry().)
Public methodStatic memberGetDomainGets the Domain object for the specified context.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetSelectiveAuthenticationStatusDetermines the authentication type of an inbound trust.
Public methodGetSidFilteringStatusDetermines the SID filtering status of a trust.
Public methodGetTrustRelationshipGets the trust relationship between this domain and the specified domain.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRaiseDomainFunctionalityRaises the mode of operation for the domain.
Public methodRepairTrustRelationshipRepairs a trust relationship.
Public methodSetSelectiveAuthenticationStatusEnables or disables selective authentication for an inbound trust.
Public methodSetSidFilteringStatusSets the SID filtering state for the specified domain.
Public methodToStringRetrieves a string representation of the current directory partition. (Inherited from ActiveDirectoryPartition.)
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 an existing trust relationship. The trust directions are updated on both sides of the trust.
Public methodVerifyOutboundTrustRelationshipVerifies that a previously established outbound trust with the specified domain is valid.
Public methodVerifyTrustRelationshipVerifies that a previously established trust with the specified domain is valid.
Top

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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
Show:
© 2014 Microsoft