diff --git a/CHANGELOG.md b/CHANGELOG.md index 390763fee..18d6bc307 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,11 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md) - ADUser - Fixed PasswordAuthentication parameter handling ([issue #582](https://github.com/dsccommunity/ActiveDirectoryDsc/issues/582)). +- ADReplicationSiteLink + - Fix Test-TargetResource when Ensure is Absent and other attributes are set + ([issue #593](https://github.com/PowerShell/ActiveDirectoryDsc/issues/593)). + +### Fixed ### Changed diff --git a/source/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1 b/source/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1 index f743bf273..a0ff43986 100644 --- a/source/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1 +++ b/source/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1 @@ -445,6 +445,10 @@ function Test-TargetResource { return $false } + elseif ($Ensure -eq 'Absent') + { + return $true + } # Test for SitesIncluded. foreach ($desiredIncludedSite in $SitesIncluded)