Peoplepicker-searchadcustomquery:Stsadm 属性 (Office SharePoint Server)

说明

允许管理员设置发送到 Active Directory 的自定义查询。

人员选取器只能对 Active Directory Windows 组名执行通配符搜索。对于任何角色提供程序(Microsoft Office SharePoint Server 2007 附带的角色提供程序除外),角色提供程序查找特定于完整名称。例如,如果您有一个名为“Readers”的组,并且在“选择人员和组”对话框中输入“Read”,则将找不到您的组。如果输入“Readers”,则搜索成功。

Important重要说明:

如果该属性 (property) 值不是正确的 Active Directory 查询,则人员选取器将会失败。此外,如果搜索的属性 (attribute) 不是 Active Directory 中的索引属性 (attribute),则 Active Directory 的性能将非常低。

语法

stsadm -o setproperty

   -propertyname peoplepicker-searchadcustomquery

   -propertyvalue <custom query string>

   [-url] <URL>

getproperty 操作的语法为:

stsadm -o getproperty

   -propertyname peoplepicker-searchadcustomquery

   [-url] <URL>

备注

您可以用 -pn 来替换 -propertyname,并用 -pv 来替换 -propertyvalue。

属性值

下表列出了可能的值。

名称

propertyname

获取或设置属性的名称。

propertyvalue

一个指定自定义查询的有效字符串。以下是一些有效字符串的示例:

  • (SomeAdAttribute={0})

  • (SomeAdAttribute={0}*)

  • (SomeAdAttribute={0})(AnotherAdAttribute={0})

SomeAdAttribute 和 AnotherAdAttribute 是 Active Directory 中某些索引属性的名称。

url

通常为 Web 应用程序 URL 的路径,格式为 http://server_name。

示例

在 Active Directory 中创建自定义查询

若要创建搜索姓氏的查询,请使用以下语法:

stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv (sn={0}*)

若要查看 searchadcustomquery 属性的当前设置,请使用以下语法:

stsadm -o getproperty -pn peoplepicker-searchadcustomquery