By default, SharePoint searches all 2-way domain trusts.  The Peoplepicker-searchadforests stsadm property restricts the SharePoint People Picker to search a subset of domains for users.

stsadm -o setproperty
   -propertyname peoplepicker-searchadforests
   -propertyvalue <valid list of forests or domains>
   [-url] <URL>

 

There are many reports of this command (and other stsadm commands) throwing a version error even though the version of the web application and farm match.

The server administration programs and the windows sharepoint services web applications on this web server are not compatible. Ensure that the administration program is the same version as the web application.

 

A common solution suggested on forums is to delete and recreate the web application.  Although this works, this may not be feasible or comfortable to perform in short notice.  Another solution is to change this value using the API.

The powershell script would look something like this:

[System.Reflection.Assemly]::LoadWithPartialName("Microsoft.SharePoint")
$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup("http://webappurl")
$domainObj = New-Object "Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain"
$domainObj.DomainName = "domain.local"
$webapp.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($domainObj)
$webapp.Update()