Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExchAcceptedDomain: Test-TargetResource for MakeDefault Parameter Failing #499

Open
nicholasrodriguez opened this issue Sep 27, 2023 · 1 comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@nicholasrodriguez
Copy link

Problem description

With the MakeDefault parameter defined the Test-TargetResource responds with the following and fails to apply the setting or verify using Test-DscConfiguration

Invalid setting 'MakeDefault'. Expected value: True. Actual value:

Verbose logs

VERBOSE: [<HOSTNAME>]: LCM:  [ Start  Resource ]  [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>]                                                                                                                                                                                          
VERBOSE: [<HOSTNAME>]: LCM:  [ Start  Test     ]  [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>]                                                                                                                                                                                          
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Testing the Exchange accepted domain settings                                                                                                                                            
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Entering function 'Test-TargetResource'. Notable parameters: Identity = 'example.com'                                                                                                       
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Getting the Exchange Accepted Domains List                                                                                                                                               
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Entering function 'Get-TargetResource'. Notable parameters: Identity = 'example.com'                                                                                                        
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Reusing existing Remote PowerShell Session to Exchange                                                                                                                                   
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing the ExchangeDsc Remote PowerShell Module.                                                                                                                                      
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Removing the imported "Get-SendConnector" function.                                                                                                                                      
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Removing the imported "Get-ADPermission" function.                                                                                                                                       
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Loading module from path 'C:\Windows\TEMP\DSCExchangeModule\DSCExchangeModule.psm1'.                                                                                                     
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing function 'Get-AcceptedDomain'.                                                                                                                                                 
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Invalid setting 'MakeDefault'. Expected value: True. Actual value:
VERBOSE: [<HOSTNAME>]: LCM:  [ End    Test     ]  [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>]  in 1.0590 seconds.
VERBOSE: [<HOSTNAME>]: LCM:  [ Start  Set      ]  [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>]
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Setting the Exchange accepted domain settings
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Entering function 'Set-TargetResource'. Notable parameters: Identity = 'example.com'
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Getting the Exchange Accepted Domains List
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Entering function 'Get-TargetResource'. Notable parameters: Identity = 'example.com'
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Reusing existing Remote PowerShell Session to Exchange
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing the ExchangeDsc Remote PowerShell Module.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Removing the imported "Get-AcceptedDomain" function.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Loading module from path 'C:\Windows\TEMP\DSCExchangeModule\DSCExchangeModule.psm1'.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing function 'Get-AcceptedDomain'.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Reusing existing Remote PowerShell Session to Exchange
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing the ExchangeDsc Remote PowerShell Module.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Removing the imported "Get-AcceptedDomain" function.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Loading module from path 'C:\Windows\TEMP\DSCExchangeModule\DSCExchangeModule.psm1'.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing function 'Get-AcceptedDomain'.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing function 'New-AcceptedDomain'.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing function 'Remove-AcceptedDomain'.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Importing function 'Set-AcceptedDomain'.
VERBOSE: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] Accepted domain example.com not compliant. Setting the desired attributes.
WARNING: [<HOSTNAME>]:                            [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>] The command completed successfully but no settings of 'example.com' have been modified.
VERBOSE: [<HOSTNAME>]: LCM:  [ End    Set      ]  [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>]  in 0.9480 seconds.
VERBOSE: [<HOSTNAME>]: LCM:  [ End    Resource ]  [[ExchAcceptedDomain]...Build-Role-Exchange-as-<HOSTNAME>]

DSC configuration

ExchAcceptedDomain "Configure-Exchange-Accepted-Domain-On-$NodeName"
{
    DomainName  = "example.com"
    Credential  = $DomainCreds
    Ensure      = 'Present'
    DomainType  = 'Authoritative'
    Name        = "example.com"
    MakeDefault = $True
}

Suggested solution

None

Operating system the target node is running

Windows 2022

Exchange Server edition and version the target node is running

2019 CU13

PowerShell version and build the target node is running

5.1

ExchangeDsc version

2.0.0
@nicholasrodriguez
Copy link
Author

I've just run some further tests, it does apply the setting but the Test-Resource function is broken so running a Test-DscConfiguration fails.

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants