Saturday, September 7, 2013

People Picker in SharePoint 2013

We can manage how to query users in People picker using stsadm as the following (You can run these commands in SharePoint Management Shell ) :

  1. To enable Cross Domain (One way )
    stsadm -o setproprety -pn peoplepicker-searchadforests -pv ",domain\abc,password;,domain2\abc,password" -url
  2. Only show certain users or groups
    stsadm -o setsiteuseraccountdirectorypath -path "OU=Users,DC=Domain,DC=Com" -url
  3. Only show Users in Site collection
    stsadm -o setproperty -pn peoplepicker-onlysearchwithinsitecollection -pv yes -url http://domain
  4. Only show enabled accounts (using filter)
    stsadm -o setproperty -pn peoplepicker-searchadcustomfilter -pv "(*(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))" -url http://domain
  5. Only show Non AD accounts
    stsadm -o setproperty -pn peoplepicker-nowindowsaccountsfornonwindowsauthenticationmode -pv yes -url http://domain

No comments:

Post a Comment