Closed jcoconnor closed 5 years ago
Hello, I´ve actually run into the same problem and I believe the problem is in this line as it tries to compare the number of languages set using a ".count" object property. But I think the object in question ($Wsus.Languages) is not an array and hence is not countable, so it always returns 1. The number of languages set must be found out some other way...
@Droncz its not an array because the Out-String
in this line converts it into a string. If you look at the PR I have submitted, correcting this resolves the problem
This PR is merged. Please let me know if further issues.
The Languages field is unable to handle multiple languages when configuring WSUS. The code sample at the bottom of this issue causes the following error to be returned:
failed to execute Set-TargetResource functionality with error message: Test-TargetResouce returned false after calling set
Have done some investigation of this with @RandomNoun7 and will submit a PR shortly to address it.
Multiple languages (e.g.
"en","ja","fr"
) are beingset
correctly, but the subsequenttest
fails to validate the setting because of a data mismatch in the comparison which causes the language test to fail if more than one language is set.The code sample that demonstrates this fault is below: