DirectorySearcher.SearchRoot 속성

정의

Active Directory 도메인 서비스 계층 구조에서 검색이 시작되는 노드를 나타내는 값을 가져오거나 설정합니다.

public:
 property System::DirectoryServices::DirectoryEntry ^ SearchRoot { System::DirectoryServices::DirectoryEntry ^ get(); void set(System::DirectoryServices::DirectoryEntry ^ value); };
public System.DirectoryServices.DirectoryEntry SearchRoot { get; set; }
public System.DirectoryServices.DirectoryEntry? SearchRoot { get; set; }
[System.DirectoryServices.DSDescription("DSSearchRoot")]
public System.DirectoryServices.DirectoryEntry SearchRoot { get; set; }
member this.SearchRoot : System.DirectoryServices.DirectoryEntry with get, set
[<System.DirectoryServices.DSDescription("DSSearchRoot")>]
member this.SearchRoot : System.DirectoryServices.DirectoryEntry with get, set
Public Property SearchRoot As DirectoryEntry

속성 값

DirectoryEntry

Active Directory 도메인 서비스 계층 구조에서 검색이 시작되는 DirectoryEntry 개체입니다. 기본값은 null 참조(Visual Basic의 경우 Nothing)입니다.

특성

설명

Visual Basic에서 null 참조Nothing인 경우 SearchRoot 검색 루트는 서버에서 현재 사용 중인 도메인의 루트로 설정됩니다.

글로벌 카탈로그에서 검색하는 방법에는 여러 가지가 있습니다.

  • 글로벌 카탈로그를 열거하고 첫 번째 자식 을 선택합니다.

  • 서버 이름을 지정합니다. DsGetDcName 함수를 사용하여 글로벌 카탈로그를 찾습니다. DsGetDcName 함수에 대한 자세한 내용은 DsGetDcName을 참조하세요.

  • 글로벌 카탈로그의 RootDSE를 가져와서 "rootNamingContext"를 요청합니다.

  • LDAP를 사용하는 것처럼 검색 경로를 지정하여 글로벌 카탈로그를 사용합니다. 예를 들어 "GC://OU=..., DC=..., DC=..."입니다.

  • 다음 C# 코드는 전역 카탈로그를 열거하고 첫 번째 자식 을 선택하는 방법을 보여 있습니다.

    DirectoryEntry entry = new DirectoryEntry("GC://forestname");  
    IEnumerator ie = entry.Children.GetEnumerator();  
    ie.MoveNext();  
    entry = (DirectoryEntry)ie.Current;  
    DirectorySearcher search = new DirectorySearcher(entry);  
    

적용 대상