ADUser: Unable to enter Debug Mode #427
Labels
enhancement
The issue is an enhancement request.
good first issue
The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Details of the scenario you tried and the problem that is occurring
There are issues with entering debug mode (using
Enable-DSCDebug -BreakAll
) when a default value for a parameter is derived from a function or another parameter.This issue has been reported both in issue dsccommunity/SqlServerDsc#448 and in issue dsccommunity/ComputerManagementDsc#231.
These lines will probably cause an issue entering debug mode.
https://github.com/PowerShell/xActiveDirectory/blob/337164a0fb4a4cf658a1a94b04e3f5501a2a4666/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1#L226
https://github.com/PowerShell/xActiveDirectory/blob/337164a0fb4a4cf658a1a94b04e3f5501a2a4666/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1#L690
https://github.com/PowerShell/xActiveDirectory/blob/337164a0fb4a4cf658a1a94b04e3f5501a2a4666/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1#L1123
Verbose logs showing the problem
Not available - this issue is proactive.
Suggested solution to the issue
Remove the default value from the parameter and instead add the following code to the start of each function needing to set this default value.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
n/a
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
The text was updated successfully, but these errors were encountered: