Skip to content

Commit

Permalink
Merge pull request #455 from SSvilen/addresslistfix
Browse files Browse the repository at this point in the history
xExchAddressList: Remove creating of scriptblock for RecipientFilter
  • Loading branch information
mhendric authored May 12, 2020
2 parents b05ae3e + 8dd8d23 commit 39c1c86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)
$env:Temp and reused every time DSC check runs, instead of creating a new
module every time.
- Added AD Permissions parameter for xExchReceiveConnector.
- xExchAddressList: Removing the scriptblock creation for RecipientFilter
property in Get-TargetResource.
- Adding missing TlsAuthLevel to xExchSendConnector Get-TargetResource function.
- Small bug fix in xExchangeHelper module.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,7 @@ function Get-TargetResource
{
if ($addressList.$property -and $addressListProperties -contains $property)
{
if ($property -eq 'RecipientFilter')
{
$returnValue[$property] = "{$($addressList.$property)}"
}
else
{
$returnValue[$property] = $addressList.$property
}
$returnValue[$property] = $addressList.$property
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xExchAddressList.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ try
Mock -CommandName Get-AddressList -Verifiable -MockWith { return [PSCustomObject] $getAddressCustomFilterOutput }

$returnValue = Get-TargetResource @getTargetResourceParams
$returnValue['RecipientFilter'] | Should -Be '{(RecipientType -eq "UserMailbox")}'
$returnValue['RecipientFilter'] | Should -Be '(RecipientType -eq "UserMailbox")'
}

Context 'When Addresslist is not present' {
Expand Down

0 comments on commit 39c1c86

Please sign in to comment.