Skip to content

Commit

Permalink
Merge pull request #1261 from jensotto/fix-failing-cahcaccountconfigu…
Browse files Browse the repository at this point in the history
…ration-parameters

SPWebAppPolicy: Fixed incorrect parameter usage
  • Loading branch information
ykuijs authored Nov 18, 2020
2 parents 3f1af01 + 0550fd0 commit 022c3b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- SPWebAppPolicy
- Fixed a blocking issue introduced in version 4.4.0 when extracting cache
accounts

## [4.4.0] - 2020-11-14

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ function Set-TargetResource
throw $message
}

$cacheAccounts = Get-SPDscCacheAccountConfiguration -InputParameters $WebAppUrl
$cacheAccounts = Get-SPDscCacheAccountConfiguration -WebApplicationUrl $WebAppUrl

if ($SetCacheAccountsPolicy)
{
Expand Down Expand Up @@ -692,7 +692,7 @@ function Test-TargetResource
return $false
}

$cacheAccounts = Get-SPDscCacheAccountConfiguration -InputParameters $WebAppUrl
$cacheAccounts = Get-SPDscCacheAccountConfiguration -WebApplicationUrl $WebAppUrl
if ($SetCacheAccountsPolicy)
{
if (($cacheAccounts.SuperUserAccount -eq "") -or `
Expand Down Expand Up @@ -944,18 +944,18 @@ function Get-SPDscCacheAccountConfiguration()
[OutputType([System.Collections.Hashtable])]
param (
[Parameter()]
[Object[]]
$InputParameters
[string]
$WebApplicationUrl
)

$cacheAccounts = Invoke-SPDscCommand -Credential $InstallAccount `
-Arguments @($InputParameters, $MyInvocation.MyCommand.Source) `
-Arguments @($WebApplicationUrl, $MyInvocation.MyCommand.Source) `
-ScriptBlock {
Write-Verbose -Message "Retrieving CacheAccounts"
$params = $args[0]
$webApplicationUrl = $args[0]
$eventSource = $args[1]

$wa = Get-SPWebApplication -Identity $params -ErrorAction SilentlyContinue
$wa = Get-SPWebApplication -Identity $webApplicationUrl -ErrorAction SilentlyContinue

if ($null -eq $wa)
{
Expand Down

0 comments on commit 022c3b9

Please sign in to comment.