DirectorySearcher DirectorySearcher DirectorySearcher DirectorySearcher Constructors

Definition

Overloads

DirectorySearcher() DirectorySearcher() DirectorySearcher()

Initializes a new instance of the DirectorySearcher class with default values.

DirectorySearcher(DirectoryEntry) DirectorySearcher(DirectoryEntry) DirectorySearcher(DirectoryEntry) DirectorySearcher(DirectoryEntry)

Initializes a new instance of the DirectorySearcher class using the specified search root.

DirectorySearcher(String) DirectorySearcher(String) DirectorySearcher(String) DirectorySearcher(String)

Initializes a new instance of the DirectorySearcher class with the specified search filter.

DirectorySearcher(DirectoryEntry, String) DirectorySearcher(DirectoryEntry, String) DirectorySearcher(DirectoryEntry, String) DirectorySearcher(DirectoryEntry, String)

Initializes a new instance of the DirectorySearcher class with the specified search root and search filter.

DirectorySearcher(String, String[]) DirectorySearcher(String, String[]) DirectorySearcher(String, String[]) DirectorySearcher(String, String[])

Initializes a new instance of the DirectorySearcher class with the specified search filter and properties to retrieve.

DirectorySearcher(DirectoryEntry, String, String[]) DirectorySearcher(DirectoryEntry, String, String[]) DirectorySearcher(DirectoryEntry, String, String[]) DirectorySearcher(DirectoryEntry, String, String[])

Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, and properties to retrieve.

DirectorySearcher(String, String[], SearchScope) DirectorySearcher(String, String[], SearchScope) DirectorySearcher(String, String[], SearchScope) DirectorySearcher(String, String[], SearchScope)

Initializes a new instance of the DirectorySearcher class with the specified search filter, properties to retrieve, and search scope.

DirectorySearcher(DirectoryEntry, String, String[], SearchScope) DirectorySearcher(DirectoryEntry, String, String[], SearchScope) DirectorySearcher(DirectoryEntry, String, String[], SearchScope) DirectorySearcher(DirectoryEntry, String, String[], SearchScope)

Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, properties to retrieve, and search scope.

DirectorySearcher() DirectorySearcher() DirectorySearcher()

Initializes a new instance of the DirectorySearcher class with default values.

public:
 DirectorySearcher();
public DirectorySearcher ();
Public Sub New ()

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchRoot A null reference (Nothing in Visual Basic)
Filter "(objectClass=*)"
PropertiesToLoad An empty StringCollection object
SearchScope Subtree

Security

DirectoryServicesPermission
Demand

See also

DirectorySearcher(DirectoryEntry) DirectorySearcher(DirectoryEntry) DirectorySearcher(DirectoryEntry) DirectorySearcher(DirectoryEntry)

Initializes a new instance of the DirectorySearcher class using the specified search root.

public:
 DirectorySearcher(System::DirectoryServices::DirectoryEntry ^ searchRoot);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry searchRoot);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry)

Parameters

searchRoot
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

The node in the Active Directory Domain Services hierarchy where the search starts. The SearchRoot property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
Filter "(objectClass=*)"
PropertiesToLoad An empty StringCollection object
SearchScope Subtree

Security

DirectoryServicesPermission
Demand

See also

DirectorySearcher(String) DirectorySearcher(String) DirectorySearcher(String) DirectorySearcher(String)

Initializes a new instance of the DirectorySearcher class with the specified search filter.

public:
 DirectorySearcher(System::String ^ filter);
public DirectorySearcher (string filter);
new System.DirectoryServices.DirectorySearcher : string -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String)

Parameters

filter
String String String String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchRoot A null reference (Nothing in Visual Basic)
PropertiesToLoad An empty StringCollection object
SearchScope Subtree

Security

DirectoryServicesPermission
Demand

See also

DirectorySearcher(DirectoryEntry, String) DirectorySearcher(DirectoryEntry, String) DirectorySearcher(DirectoryEntry, String) DirectorySearcher(DirectoryEntry, String)

Initializes a new instance of the DirectorySearcher class with the specified search root and search filter.

public:
 DirectorySearcher(System::DirectoryServices::DirectoryEntry ^ searchRoot, System::String ^ filter);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry searchRoot, string filter);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry * string -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry, filter As String)

Parameters

searchRoot
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

The node in the Active Directory Domain Services hierarchy where the search starts. The SearchRoot property is initialized to this value.

filter
String String String String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
PropertiesToLoad An empty StringCollection object.
SearchScope Subtree

Security

DirectoryServicesPermission
Demand

See also

DirectorySearcher(String, String[]) DirectorySearcher(String, String[]) DirectorySearcher(String, String[]) DirectorySearcher(String, String[])

Initializes a new instance of the DirectorySearcher class with the specified search filter and properties to retrieve.

public:
 DirectorySearcher(System::String ^ filter, cli::array <System::String ^> ^ propertiesToLoad);
public DirectorySearcher (string filter, string[] propertiesToLoad);
new System.DirectoryServices.DirectorySearcher : string * string[] -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String, propertiesToLoad As String())

Parameters

filter
String String String String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

propertiesToLoad
String[]

The set of properties to retrieve during the search. The PropertiesToLoad property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchRoot A null reference (Nothing in Visual Basic)
SearchScope Subtree

Security

DirectoryServicesPermission
Demand

See also

DirectorySearcher(DirectoryEntry, String, String[]) DirectorySearcher(DirectoryEntry, String, String[]) DirectorySearcher(DirectoryEntry, String, String[]) DirectorySearcher(DirectoryEntry, String, String[])

Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, and properties to retrieve.

public:
 DirectorySearcher(System::DirectoryServices::DirectoryEntry ^ searchRoot, System::String ^ filter, cli::array <System::String ^> ^ propertiesToLoad);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry searchRoot, string filter, string[] propertiesToLoad);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry * string * string[] -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry, filter As String, propertiesToLoad As String())

Parameters

searchRoot
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

The node in the Active Directory Domain Services hierarchy where the search starts. The SearchRoot property is initialized to this value.

filter
String String String String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

propertiesToLoad
String[]

The set of properties that are retrieved during the search. The PropertiesToLoad property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchScope Subtree

Security

DirectoryServicesPermission
Demand

See also

DirectorySearcher(String, String[], SearchScope) DirectorySearcher(String, String[], SearchScope) DirectorySearcher(String, String[], SearchScope) DirectorySearcher(String, String[], SearchScope)

Initializes a new instance of the DirectorySearcher class with the specified search filter, properties to retrieve, and search scope.

public:
 DirectorySearcher(System::String ^ filter, cli::array <System::String ^> ^ propertiesToLoad, System::DirectoryServices::SearchScope scope);
public DirectorySearcher (string filter, string[] propertiesToLoad, System.DirectoryServices.SearchScope scope);
new System.DirectoryServices.DirectorySearcher : string * string[] * System.DirectoryServices.SearchScope -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String, propertiesToLoad As String(), scope As SearchScope)

Parameters

filter
String String String String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

propertiesToLoad
String[]

The set of properties to retrieve during the search. The PropertiesToLoad property is initialized to this value.

scope
SearchScope SearchScope SearchScope SearchScope

The scope of the search that is observed by the server. The SearchScope property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchRoot A null reference (Nothing in Visual Basic)

Security

DirectoryServicesPermission
Demand

See also

DirectorySearcher(DirectoryEntry, String, String[], SearchScope) DirectorySearcher(DirectoryEntry, String, String[], SearchScope) DirectorySearcher(DirectoryEntry, String, String[], SearchScope) DirectorySearcher(DirectoryEntry, String, String[], SearchScope)

Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, properties to retrieve, and search scope.

public:
 DirectorySearcher(System::DirectoryServices::DirectoryEntry ^ searchRoot, System::String ^ filter, cli::array <System::String ^> ^ propertiesToLoad, System::DirectoryServices::SearchScope scope);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry searchRoot, string filter, string[] propertiesToLoad, System.DirectoryServices.SearchScope scope);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry * string * string[] * System.DirectoryServices.SearchScope -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry, filter As String, propertiesToLoad As String(), scope As SearchScope)

Parameters

searchRoot
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

The node in the Active Directory Domain Services hierarchy where the search starts. The SearchRoot property is initialized to this value.

filter
String String String String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

propertiesToLoad
String[]

The set of properties to retrieve during the search. The PropertiesToLoad property is initialized to this value.

scope
SearchScope SearchScope SearchScope SearchScope

The scope of the search that is observed by the server. The SearchScope property is initialized to this value.

Security

DirectoryServicesPermission
Demand

See also

Applies to