Gets or sets the scope of the search that is observed by the server.
[Visual Basic] Public Property SearchScope As SearchScope [C#] public SearchScope SearchScope {get; set;} [C++] public: __property SearchScope get_SearchScope(); public: __property void set_SearchScope(SearchScope); [JScript] public function get SearchScope() : SearchScope; public function set SearchScope(SearchScope);
One of the SearchScope values. The default is Subtree.
| Exception Type | Condition |
|---|---|
| InvalidEnumArgumentException | The value is not one of the SearchScope values. |
The following table shows the SearchScope values.
| Value | Description |
|---|---|
| Base | Limits the search to the base object. The result contains at most one object. |
| OneLevel | Searches one level of the immediate children, excluding the base object. |
| Subtree | Searches the whole subtree, including all children and the base object itself. |
For more information on these values, see SearchScope.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
DirectorySearcher Class | DirectorySearcher Members | System.DirectoryServices Namespace | SearchScope