diff --git a/CHANGELOG.md b/CHANGELOG.md index c2b38d40..ecf70959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,8 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md) - xExchange - Update CI pipeline files. - Fixing xExchSendConnector ExtendedRight functionality by moving the test function -to the helper module and setting explicit Deny permissions, instead of removing -the marked as 'Deny' entries. + to the helper module and setting explicit Deny permissions, instead of removing + the marked as 'Deny' entries. ## [1.31.0] - 2020-01-27 diff --git a/source/DSCResources/MSFT_xExchSendConnector/MSFT_xExchSendConnector.psm1 b/source/DSCResources/MSFT_xExchSendConnector/MSFT_xExchSendConnector.psm1 index a2674bfe..3b200d14 100644 --- a/source/DSCResources/MSFT_xExchSendConnector/MSFT_xExchSendConnector.psm1 +++ b/source/DSCResources/MSFT_xExchSendConnector/MSFT_xExchSendConnector.psm1 @@ -332,11 +332,6 @@ function Set-TargetResource $connector = Get-TargetResource -Name $Name -Credential $Credential -AddressSpaces $AddressSpaces - if (-not $DomainController) - { - $PSBoundParameters['DomainController'] = Get-DomainController | Select-Object -First 1 | ForEach-Object -MemberName 'DnsHostName' - } - if ($Ensure -eq 'Absent') { Write-Verbose -Message "Removing send connector $Name." @@ -358,6 +353,12 @@ function Set-TargetResource New-SendConnector @PSBoundParameters + if ($ExtendedRightAllowEntries -or $ExtendedRightDenyEntries) + { + # Setting some sleep period to allow intra-site replication + Start-Sleep -Seconds 180 + } + if ($ExtendedRightAllowEntries) { foreach ($ExtendedRightAllowEntry in $ExtendedRightAllowEntries) diff --git a/tests/Unit/MSFT_xExchSendConnector.tests.ps1 b/tests/Unit/MSFT_xExchSendConnector.tests.ps1 index 8f08dba9..ba0cf1c2 100644 --- a/tests/Unit/MSFT_xExchSendConnector.tests.ps1 +++ b/tests/Unit/MSFT_xExchSendConnector.tests.ps1 @@ -402,6 +402,7 @@ try $TestTargetResourceParamsFalse['ExtendedRightAllowEntries'] = ( New-CimInstance -ClassName 'MSFT_KeyValuePair' -Property @{ key = 'User1Allow' + # Picking 2 random permissions to test with value = 'ms-Exch-SMTP-Accept-Any-Recipient,ms-Exch-SMTP-Accept-Authoritative-Domain-Sender' } -ClientOnly )