Description

Enables a farm administrator to specify a unique search query. A criterion that is entered searches the people that meet both the built-in query functionality or a custom query that is defined by a farm administrator. For additional information on custom queries and Active Directory, see the Peoplepicker-searchadcustomquery operation.

Note

The Peoplepicker-searchadcustomfilter property was first introduced in Microsoft Office SharePoint Server 2007 Service Pack 1.

Syntax

stsadm -o setproperty

-propertyname peoplepicker-searchadcustomfilter

-propertyvalue<custom query string>

**\[-url\]** *\<URL\>*

The syntax for the getproperty operation is:

stsadm -o getproperty

-propertyname peoplepicker-searchadcustomfilter

**\[-url\]** *\<URL\>*

Note

You can substitute -pn for -propertyname and -pv for -propertyvalue.

Values

The following table shows possible values.

Name

Value

propertyname

Gets or sets the name of the property.

propertyvalue

Name of query string or custom filter, for example, (!(sn=Zhu)).

The filter name must be a valid Active Directory query. Otherwise, the People Picker does not work correctly.

The filter is only applied when the Browse icon is clicked. The filter is not applied when Check Names icon is clicked; however, the user name is still resolved.

For example, assume there is a user with login name Domain\Joe, whose display name is "Joe" and "Joe" is unique in Active Directory. The farm administrator specifies the following custom filter: (!(Title=Joe)). If you type "Joe" and click the Check Name icon, the user name is resolved. However, you cannot use the Select People and Groups dialog box to search for the user "Joe".

url

Typically, a path to the URL of the site collection, in the form http://server_name.

In the Example section, http://contoso is the name of the Web application that is targeted.

Examples

To create a custom filter that searches for the user "David" in the Active Directory in the Contoso domain, use the following syntax: