dsccommunity / SharePointDsc

The SharePointDsc PowerShell module provides DSC resources that can be used to deploy and manage a SharePoint farm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SPWebAppPeoplePickerSettings: Cannot set PeopleEditorOnlyResolveWithinSiteCollection property

egor-yudkin opened this issue · comments

Details of the scenario you tried and the problem that is occurring

I'm configuring People Picker settings for a web application, and I need to set both OnlySearchWithinSiteCollection and PeopleEditorOnlyResolveWithinSiteCollection to $true. The first property is available in SPWebAppPeoplePickerSettings, but the second is not.

Verbose logs showing the problem

n/a

Suggested solution to the issue

Add PeopleEditorOnlyResolveWithinSiteCollection parameter to SPWebAppPeoplePickerSettings resource

The DSC configuration that is used to reproduce the issue (as detailed as possible)

SPWebAppPeoplePickerSettings "WebApp_PeoplePicker" {
          WebAppUrl                                                       = "https://mywebapp/"
          OnlySearchWithinSiteCollection                       = $true
          PeopleEditorOnlyResolveWithinSiteCollection = $true # This doesn't work, obviously
          PsDscRunAsCredential                                      = $SetupAccount
          DependsOn                                                       = @("[SPWebApplication]WebApp)")
 }

The operating system the target node is running

OsName : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US}

Version and build of PowerShell the target node is running

PSVersion 5.1.17763.2268
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.2268
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used

SharePointDsc 5.0.0

This is a quick addition. Will be added in my next PR.