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

xADOrganizationalUnit: Test-TargetResource showing wrong verbose message #276

Closed
johlju opened this issue May 16, 2019 · 0 comments · Fixed by #396
Closed

xADOrganizationalUnit: Test-TargetResource showing wrong verbose message #276

johlju opened this issue May 16, 2019 · 0 comments · Fixed by #396
Labels
bug The issue is a bug. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub

Comments

@johlju
Copy link
Member

johlju commented May 16, 2019

Details of the scenario you tried and the problem that is occurring

Due to a verbose message in the Test-TargetResource it is unclear if the resource actually works when setting Ensure to 'Absent'.

Verbose logs showing the problem

First run:

VERBOSE: [CLDC03]: LCM:  [ Start  Resource ]  [[xADOrganizationalUnit]RemoveGlobal]
VERBOSE: [CLDC03]: LCM:  [ Start  Test     ]  [[xADOrganizationalUnit]RemoveGlobal]
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] Importing the module MSFT_xADOrganizationalUnit in force mode.
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] Retrieving OU 'Global'.
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] OU 'Global' exists when it should not exist.
VERBOSE: [CLDC03]: LCM:  [ End    Test     ]  [[xADOrganizationalUnit]RemoveGlobal]  in 0.0470 seconds.
VERBOSE: [CLDC03]: LCM:  [ Start  Set      ]  [[xADOrganizationalUnit]RemoveGlobal]
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] Importing the module MSFT_xADOrganizationalUnit in force mode.
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] Retrieving OU 'Global'.
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] Deleting OU 'Global'.
VERBOSE: [CLDC03]: LCM:  [ End    Set      ]  [[xADOrganizationalUnit]RemoveGlobal]  in 0.0620 seconds.
VERBOSE: [CLDC03]: LCM:  [ End    Resource ]  [[xADOrganizationalUnit]RemoveGlobal]

Second run (verbose message says OU still exists):

VERBOSE: [CLDC03]: LCM:  [ Start  Resource ]  [[xADOrganizationalUnit]RemoveGlobal]
VERBOSE: [CLDC03]: LCM:  [ Start  Test     ]  [[xADOrganizationalUnit]RemoveGlobal]
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] Importing the module MSFT_xADOrganizationalUnit in force mode.
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] Retrieving OU 'Global'.
VERBOSE: [CLDC03]:                            [[xADOrganizationalUnit]RemoveGlobal] OU 'Global' exists and is in the desired state.
VERBOSE: [CLDC03]: LCM:  [ End    Test     ]  [[xADOrganizationalUnit]RemoveGlobal] True in 0.0160 seconds.
VERBOSE: [CLDC03]: LCM:  [ End    Resource ]  [[xADOrganizationalUnit]RemoveGlobal]

Suggested solution to the issue

Probably just a verbose message that need to be updated/added in the Test-TargetResource function.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

        xADOrganizationalUnit 'RemoveGlobal'
        {
            Ensure = 'Absent'
            Name   = $Node.OrganizationalUnitName
            Path   = $Node.DomainDistinguishedName
        }

The operating system the target node is running

n/a

Version and build of PowerShell the target node is running

n/a

Version of the DSC module that was used ('dev' if using current dev branch)

dev

@johlju johlju added bug The issue is a bug. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community. labels May 16, 2019
johlju pushed a commit that referenced this issue Jun 26, 2019
- Changes to xADOrganizationalUnit
  - Fix incorrect verbose message when this resource has Ensure set to Absent (issue #276).
@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Jun 26, 2019
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. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant