Forest.DeleteTrustRelationship Method (Forest)

 

Deletes both sides of a trust relationship.

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

public void DeleteTrustRelationship(
	Forest targetForest
)

Parameters

targetForest
Type: System.DirectoryServices.ActiveDirectory.Forest

A Forest object that represents the forest that the trust exists with.

Exception Condition
ActiveDirectoryObjectNotFoundException

There is no trust relationship with the specified Forest.

ActiveDirectoryOperationException

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

ActiveDirectoryServerDownException

The target server is either busy or unavailable.

ArgumentNullException

targetForest 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 Forest.DeleteLocalSideOfTrustRelationship method.

.NET Framework
Available since 2.0
Return to top
Show: