STSADM.exe -o setapppassword -password “Password”
#Cross Domain \ Multi domain
#Pass the Password in a variable
$password = 'XXXXXX'
$SecurePassword = (ConvertTo-SecureString $password -AsPlainText -Force)
$UnSecurePassword = [System.Net.NetworkCredential]::new("",$SecurePassword).Password
#Run People Picker command
stsadm -o setproperty -url http://mysite.com/ -pn peoplepicker-searchadforests -pv "domain:Localdomain.com;domain:Guestdomain.com",Guestdomain\XXXX,$UnSecurePassword
# Enable the global setting for the farm. This must run in SP2019
$farm = get-spfarm
$farm.Properties #show current properties values
$farm.Properties["disable-netbios-dc-resolve"] = "True"
$farm.Properties
$farm.Update()
#if you require filter
stsadm -o setproperty -url https://mysite.com -pn peoplepicker-searchadcustomfilter -pv "(|(mail=*@abcd.com) (mail=*@efgh.com) (mail=*@xyz.com) (userPrincipalName=*@Localdomain.com) (objectcategory=group))"
#this has to run to sync
stsadm -o sync
#Get People picker Value
$wa = Get-SPWebApplication https://mysite.com
$wa.PeoplePickerSettings
#Remove People picker from SharePoint
STSADM.exe -o setproperty -pn peoplepicker-searchadforests -pv -url "http://mysite.com"
#remove the properties.
$wa = Get-SPWebApplication http://mysite.com
$wa.PeoplePickerSettings.ActiveDirectoryCustomFilter = $null
$wa.Update()
No comments:
Post a Comment