DeleteTrustRelationship Method

Domain.DeleteTrustRelationship Method (Domain)

 

Deletes both sides of a trust relationship.

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

public void DeleteTrustRelationship(
	Domain targetDomain
)

Parameters

targetDomain
Type: System.DirectoryServices.ActiveDirectory.Domain

A Domain object that represents the domain that the trust exists with.

Exception Condition
ActiveDirectoryObjectNotFoundException

There is no trust relationship with the specified Domain.

ActiveDirectoryOperationException

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

ActiveDirectoryServerDownException

The target server is either busy or unavailable.

ArgumentNullException

targetDomain is null.

ObjectDisposedException

The object has been disposed.

UnauthorizedAccessException

The specified account does not have permission to perform this operation.

To delete only one side of a trust relationship, use the Domain.DeleteLocalSideOfTrustRelationship method.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft