Open bagajjal opened 2 years ago
Possible temporary workarounds until the bug is fixed: 1) comment out any of CmdletsToExport / FunctionsToExport / AliasesToExport (for example, it it is an empty array) 2) specify a wildcard for any of CmdletsToExport / FunctionsToExport / AliasesToExport
I have just experiences the issue and it took some time to find out what it was caused by that bug. Are there plans to fix it?
Related/Duplicate https://github.com/PowerShell/PSDesiredStateConfiguration/issues/101
Prerequisites
Steps to reproduce
Get-DscResource doesn't show class-based DSC resources if the PSD1 has all of these CmdletsToExport, FunctionsToExport, AliasesToExport. To mitigate the issues, one of them has to be commented. This is a bug introduced during the PowerShell performance related changes. Andrew Menagarishvili has looked into the code and confirmed this bug.
Expected behavior
Actual behavior
Error details
Environment data
Visuals
Get-DSCResource doesn't show the class-based DSC resource
With workaround by commenting functionsToExport, Get-DscResource shows the class-based DSC Resource