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 (sprocks.io) and a domain (sprocks.us) 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 "forest:sprocks.io;domain:sprocks.us,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.

No comments:

Post a Comment