Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, December 29, 2016 7:54 PM
Hi,
We have a new domain(Eg: xyz.xxx.com) created in AD and this has not gone live yet.
We have Sharepoint Environments and users starting showing up from xyz.xxx.com via People Picker. I need help to either Hide/Remove specific domain from people picker search.
I have used the following script, but no luck:
$wa = Get-SPWebApplication "http://yyy.com"
$adsearchobj = New-Object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$adsearchobj.DomainName = "xyz.xxx.com"
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.remove($adsearchobj)
$wa.Update()
Please help me to address the issue.
Note: I have used the same script for adding new domains and it worked in those scenarios but am unable to remove specific domain from People Picker Search
Many thanks
Venkat
Venkatesan Nadimuthu
All replies (1)
Friday, December 30, 2016 9:03 AM
Hi Venkatesan Nadimuthu,
There is a workaround.
You could apply custom filters to people picker by STSADM command to filter people only from some domains. For more detailed information, you could refer to the article below.
Apply Filters to People Picker in SharePoint - E.g. Don't show User Accounts with No E-mail.
http://www.sharepointdiary.com/2012/04/people-picker-filter-in-sharepoint.html
More reference:
Restrict People Picker to a certain group in Active Directory.
https://technet.microsoft.com/en-us/library/gg602075(v=office.14).aspx#section5
Best regards,
Sara Fan
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]