Search code examples
powershellpowershell-5.0dsc

Can I stored class based DSC resource in separate file from PSM file?


Currently, for my modules, I store actual code in a separate file from PSM1 file, then dot source it and use Export-ModuleMember to export Functions, this way it allows me easily debug/test individual functions.

I assume it's not possible since Export-ModuleMember does not give the option to export DSCResource but is it possible to have a similar setup for class based DSC Resources?


Solution

  • Bug filed against WMF 5.0. Please upvote.

    https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/14288805-nested-modules-does-not-work-invoke-dscresource