From 9ffab4f9e7ae234fdbf7a9d810a8743f905dd024 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Fri, 5 Nov 2021 08:44:36 +0100 Subject: [PATCH 1/2] Added SQL Auth check to Test method as well --- .../MSFT_SPSearchServiceApp.psm1 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 index 6237a6d05..cd5fafe2d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 @@ -724,7 +724,18 @@ function Test-TargetResource Write-Verbose -Message "Testing Search service application '$Name'" $PSBoundParameters.Ensure = $Ensure - $PSBoundParameters.FixFarmAccountPermissions = $FixFarmAccountPermissions + + if ($UseSQLAuthentication -eq $true) + { + Write-Verbose ("Cannot check Farm Account permissions when SQL " + ` + "DatabaseCredentials are specified.") + Write-Verbose "Setting FixFarmAccountPermissions to False" + $PSBoundParameters.FixFarmAccountPermissions = $false + } + else + { + $PSBoundParameters.FixFarmAccountPermissions = $FixFarmAccountPermissions + } $CurrentValues = Get-TargetResource @PSBoundParameters From 99f3dd30dce243dd61a7db661cab1b9fd0274343 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Fri, 5 Nov 2021 08:48:29 +0100 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ec6c461f..21a9934d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed issue where the resource was using hardcoded SP2016 and later paths and therefore didn't work in SP2013 - SPSearchServiceApp - - Disabled Farm account DB ownership updating functions when using SQL Auth + - Disabled the Farm account DB ownership check when using SQL Auth - SPServiceAppPool - Fixed issue in Export method where the PsDscRunAsCredential was stored as a string instead of a PsCredential object