Forest.GetTrustRelationship(String) 方法

定義

取得此樹系和指定之樹系之間的信任關係。

public:
 System::DirectoryServices::ActiveDirectory::ForestTrustRelationshipInformation ^ GetTrustRelationship(System::String ^ targetForestName);
public System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipInformation GetTrustRelationship (string targetForestName);
member this.GetTrustRelationship : string -> System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipInformation
Public Function GetTrustRelationship (targetForestName As String) As ForestTrustRelationshipInformation

參數

targetForestName
String

要獲得信任關係資訊的 Forest 物件名稱。

傳回

ForestTrustRelationshipInformation 物件,表示此樹系和指定之樹系之間的信任關係。

例外狀況

targetForestName 指定的 Forest 沒有信任關係。

呼叫基礎目錄服務時,發生錯誤。

目標伺服器忙碌或無法使用。

targetForestName 為空字串。

targetForestNamenull

目前的物件已經處置。

指定的帳戶沒有執行這項作業的權限。

適用於

另請參閱