My-Random-Thoughts/QA-Checks-v4

DNS Check fails when setting OrderSpecific and AllMustExist to false

MuleDad opened this issue · 1 comments

When setting OrderSpecific and AllMustExist to false, and including a list of multiple servers, even if only server are discovered that are on the list, the check fails. I think in the net-11-dns-settings function, the AllMustExist IF runs and then separately the OderSpecific runs afterwards. So if you have listed 10.0.0.4 and 10.0.0.8, and only 10.0.0.4 is found, it fails the If ($Found -ne ($script:chkValues['DNSServers'].Count))

I think changing If ($Found -ne ($script:chkValues['DNSServers'].Count)) to If ($Found -eq 0) is the fix

Wow, it's been a long time since I looked at this.
Your fix makes sense, thanks very much for supplying it.