Issue with peoplepicker-searchadforests stsadm

Some might be thinking that STSADM is no more valid especially with SP 2013. Well, its not. STSADM can still be used in SP2013 and some settings like PeoplePicker settings can be easily configured using the STSADM commands. One of the commands (PeoplePicker-SearchADForersts) is used to add/remove AD domains in SharePoint servers so that the users can be recognized in the people picker.People Picker will only query the forests or domains that you specify in the peoplepicker-searchadforests property setting. This is how you add new domains and forests to the people picker for a particular web app:

Below command will add the domains (, & and forest ( to the people picker for http://webappurl site.

STSADM.exe -o setproperty -pn peoplepicker-searchadforests -pv “;;;” -url http://webappurl


If the above command is executed as below you will see mixed results.The difference between the above and below command is that there is a space after each domain name (after the semi-colon).

STSADM.exe -o setproperty -pn peoplepicker-searchadforests -pv “;;;” -url http://webappurl

After running the above command you can check the property settings using below command:

STSADM.exe -o getproperty -pn peoplepicker-searchadforests -url http://webappurl

The results might look something like this:

<Property Exist=”Yes” Value=”;;;”/>

As I highlighted above the domains changed to forest in this property. This happens only when there is a space after each domain name in the setproperty command. I took sometime before I realized this issue and one of my colleagues helped me identify this problem.

Hopefully this will save some time for anyone running these commands.

References: (SP 2013) (SP 2010)



Comments (3)

  1. Faisal Masood - PMP, MCTS, MCITP says:

    Thanks for sharing this post.

    Faisal Masood – PMP, MCTS, MCITP

  2. Pete says:

    I think this may be very useful information!


  3. MP says:

    I was going crazy! 🙂

Skip to main content