DeleteLocalSideOfTrustRelationship Method

Domain.DeleteLocalSideOfTrustRelationship Method (String)

 

Deletes the local side of a trust relationship.

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

Public Sub DeleteLocalSideOfTrustRelationship (
	targetDomainName As String
)

Parameters

targetDomainName
Type: System.String

The DNS name of the domain that the trust exists with.

Exception Condition
ActiveDirectoryObjectNotFoundException

There is no trust relationship with the Domain that is specified by the targetDomainName parameter.

ActiveDirectoryOperationException

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

ActiveDirectoryServerDownException

The target server is either busy or unavailable.

ArgumentException

targetDomainName is an empty string.

ArgumentNullException

targetDomainName is null.

ObjectDisposedException

The object has been disposed.

UnauthorizedAccessException

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

When one side of a trust relationship is deleted, the trust longer exists.

To delete both sides of a trust relationship with one method call, use the Domain.DeleteTrustRelationship method.

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