Issue while Setting people picker for SharePoint 2019

Highlighted
New Contributor

hello All,

I have working on building SharePoint 2019 environment and have requirement to set peoplepicker to set to get limited users only from Active directory.

 

I am using below script to set .

 

$WebApp = Get-SPWebApplication https://sharepoint.abc.com/;
$WebApp = Get-SPWebApplication http://AppServer/;
$WebApp = Get-SPWebApplication http://AppServerFQDNUrl/;

 

$WebApp.PeoplePickerSettings.ActiveDirectoryCustomFilter = "(&(!samaccountname=x6*)(!employeetype=type1)(!employeetype=type2)(!employeetype=type3)(!employeetype=type3)(!employeetype=type4)(!userAccountControl:1.2.840.113556.1.4.803:=2))"

 

$WebApp.Update()

 

Filter query is not working correctly in people picker.

But same time when I run this for using below method, it gives expected results.

 

Get-ADObject -LDAPfilter '(&(!samaccountname=x6*)(!employeetype=type1)(!employeetype=type2)(!employeetype=type3)(!employeetype=type3)(!employeetype=type4)(!userAccountControl:1.2.840.113556.1.4.803:=2))' | ogv

 

 

0 Replies