Friday, April 29, 2016

SharePoint 2013: Change the People Picker to allow multiple domains

This is an easy script to change the people picker if your organisation has multiple domains.
For example, if you have one forest ( and a domain ( in your organisation, the script would look like this:

Add-PSSnapin Microsoft.SharePoint.Powershell -EA 0

stsadm -o setapppassword -password FARMACCOUNTPW
stsadm -o setproperty -url http://centraladminurl -pn "peoplepicker-searchadforests" -pv ";,USERNAME,PASSWORD"

It is important to note that USERNAME and PASSWORD belong to a user that has access to both domains and is allowed to search them.
Also you will have to run "Add-PSSnapin Microsoft.SharePoint.Powershell -EA 0" to use stsadm commands in PowerShell.