dsccommunity / ActiveDirectoryDsc

This module contains DSC resources for deployment and configuration of Active Directory Domain Services.
MIT License
345 stars 142 forks source link

Incorrect key reference when setting site link options? #637

Closed ixniz closed 1 year ago

ixniz commented 3 years ago

https://github.com/dsccommunity/ActiveDirectoryDsc/blob/87b1308891fb28d092aa12eb886661cd15d5d018/source/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1#L290

A cursory glance through the code seems to indicate that the specified line contains a reference to the wrong key.

"if ($PSBoundParameters.ContainsKey('ReplicationFrequencyInMinutes') -and" should probably be "if ($PSBoundParameters.ContainsKey('OptionChangeNotification') -and"

Every site link option contains the same check for the presence of the ReplicationFrequencyInMinutes key. I'm not sure if this is the intention, but it seems that if the replication frequency isn't also defined, the site link options remain the current values.

johlju commented 3 years ago

Yes, looks like you are correct.