I have started writing class-based custom DSC resources for my organization. However, I couldn't find any internet article or post that gives any guidance on writing help for my resources. When I try below command in the console I get HelpNotFoundException:
Get-Help -Name RESOURCENAME
However, I can see MS article on writing help for DSC configurations. But nothing on resources.
Resources don't support a -whatif, really. A function-based resource can obviously declare it, but the LCM never will use it.
The right way to structure the code, as we outline in "The DSC Book," is to put ALL of your actual functionality into normal script modules, and then just CALL that from the Get/Test/Set resource functions/classes. That way, the actual useful code gets help, gets -whatif, gets everything – and the resource itself just becomes a thin, meaningless wrapper around it.
The topic ‘Writing comment-based help for class based custom DSC resources’ is closed to new replies.