Documentation and examples for using DynamicKeyword RRS feed

  • General discussion

  • I've recently encountered a situation where I needed to define a configuration mechanism and format for our ops team for a piece of our infrastructure that needs to be managed across multiple instances.  The configuration elements are wide and deep and I thought this would be a great opportunity to define a DSL for them that would be somewhat self-documenting and self-guiding.

    I quickly thought of how DSC is implemented as a language within a language and that the configuration keyword extension to PS is exactly the kind of functionality I'm looking for -- within ISE, the IntelliSense helps to guide the configuration options and structure inline without the need to constantly reference docs and online help.

    I know (or at least I think I know) that the DSC configuration format is implemented within a PS module itself and I've dug through this code somewhat and have seen that it's tapping into System.Management.Automation.Language.DynamicKeyword to manipulate the inline language support, but the usage is not very clear or straightfoward.

    Bingling around I found MSDN docs for this and related classes, but the actual documentation is missing, simply including the comment:

        "TBD. Introduced in Windows PowerShell 4.0."

    in all the related docs.  And there appears to be no overall usage description, examples or even any mention on any authoritative sources, and only a couple snippets of sample code here and there.

    So my question is, is this intentional and is this language extension mechanism meant to be obscure and reserved for internal PS usage only?  And if not, then where does one get the details to make use of this feature?

    Sunday, January 17, 2016 3:22 PM

All replies