PowerShell / PSDesiredStateConfiguration

Source for https://www.powershellgallery.com/packages/PSDesiredStateConfiguration module
MIT License
58 stars 14 forks source link

Get-DSCResource to show when there are syntax errors. #46

Open bagajjal opened 3 years ago

bagajjal commented 3 years ago

Current behavior - Get-DSCResource shows a generic message " The term {0} is not found as a resource" when there is a syntax error in the DSC resource (.psm1).

Feature request - In case of syntax errors, Get-DSCResource should show the actual syntax error message.

Given Get-DscResource can be called without any arguments, this might clutter the console output if there are way many modules with syntax errors in $env:PSModulePath. It's good idea to surface the underlying syntax error message only when user calls Get-DscResource -Module