Forest.CreateTrustRelationship(Forest, TrustDirection) Método
Definição
Cria os dois lados de uma relação de confiança com a floresta especificada.Creates both sides of a trust relationship with the specified forest.
public:
void CreateTrustRelationship(System::DirectoryServices::ActiveDirectory::Forest ^ targetForest, System::DirectoryServices::ActiveDirectory::TrustDirection direction);
public void CreateTrustRelationship (System.DirectoryServices.ActiveDirectory.Forest targetForest, System.DirectoryServices.ActiveDirectory.TrustDirection direction);
member this.CreateTrustRelationship : System.DirectoryServices.ActiveDirectory.Forest * System.DirectoryServices.ActiveDirectory.TrustDirection -> unit
Public Sub CreateTrustRelationship (targetForest As Forest, direction As TrustDirection)
Parâmetros
- targetForest
- Forest
Um objeto Forest que representa a floresta com a qual a relação de confiança está sendo criada.A Forest object that represents the forest that the trust is being created with.
- direction
- TrustDirection
Um dos membros TrustDirection que determina a direção da relação de confiança, em relação a esta floresta.One of the TrustDirection members that determines the direction of the trust, relative to this forest.
Exceções
A relação de confiança já existe.The trust relationship already exists.
Uma chamada ao serviço de diretório subjacente resultou em um erro.A call to the underlying directory service resulted in an error.
O servidor de destino está ocupado ou indisponível.The target server is either busy or unavailable.
targetForest é null.targetForest is null.
direction não é um valor TrustDirection válido.direction is not a valid TrustDirection value.
O objeto foi eliminado.The object has been disposed.
A conta especificada não tem permissão para executar essa operação.The specified account does not have permission to perform this operation.
Comentários
Esse método cria ambos os lados de uma relação de confiança com uma única chamada de método.This method creates both sides of a trust relationship with a single method call. O Forest.CreateLocalSideOfTrustRelationship método é usado para criar apenas um lado de uma relação de confiança.The Forest.CreateLocalSideOfTrustRelationship method is used to create only one side of a trust.