You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
I have an EXO configuration that I am trying to test with DSC (Test-DscConfiguration).
When I run the test I get an error message for the EXOAcceptedDomains objects that I have.
Example of EXOAcceptedDomain that passes the test without error :
Log generated when I have the error :
##[error]PowerShell DSC resource MSFT_EXOAcceptedDomain failed to execute Test-TargetResource functionality with error
message: Cannot validate argument on parameter 'MatchSubDomains'. The " $false -eq $_ " validation script for the
argument with value "True" did not return a result of True. Determine why the validation script failed, and then try
the command again.
Suggested solution to the issue
I looked into MSFT_EXOAcceptedDomain.psm1 and it looks like there a difference between what's documented and the actual behavior.
The documentation says :
The MatchSubDomains parameter must be false on Authoritative domains. The default value is false. https://microsoft365dsc.com/resources/exchange/EXOAcceptedDomain/
The ValideScript doesn't take the "DomainType" into account.
It just says :
I think one way to fix it would be to remove the ValidateScript completely and test the value in regards to the DomainType in the processing part of the Test-TargetResource function.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Details of the scenario you tried and the problem that is occurring
I have an EXO configuration that I am trying to test with DSC (Test-DscConfiguration).
When I run the test I get an error message for the EXOAcceptedDomains objects that I have.
Example of EXOAcceptedDomain that passes the test without error :
Example that fails :
Verbose logs showing the problem
Log generated when I have the error :
##[error]PowerShell DSC resource MSFT_EXOAcceptedDomain failed to execute Test-TargetResource functionality with error
message: Cannot validate argument on parameter 'MatchSubDomains'. The " $false -eq $_ " validation script for the
argument with value "True" did not return a result of True. Determine why the validation script failed, and then try
the command again.
Suggested solution to the issue
I looked into MSFT_EXOAcceptedDomain.psm1 and it looks like there a difference between what's documented and the actual behavior.
The documentation says :
The MatchSubDomains parameter must be false on Authoritative domains. The default value is false.
https://microsoft365dsc.com/resources/exchange/EXOAcceptedDomain/
The ValideScript doesn't take the "DomainType" into account.
It just says :
I think one way to fix it would be to remove the ValidateScript completely and test the value in regards to the DomainType in the processing part of the Test-TargetResource function.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Windows 10
Version of the DSC module that was used ('dev' if using current dev branch)
1.22.209.1
The text was updated successfully, but these errors were encountered: