Windows Vista Forums

PowerShell MAML Tools?
  1. #1


    Keith Hill [MVP] Guest

    PowerShell MAML Tools?

    Has anybody written a tool that reflects upon a PoSh snapin assembly and
    generates the skeleton MAML help file? These are quite tedious and tricky
    to write by hand. Anybody know where can I find the schemas for MAML and
    PowerShell's dialect of MAML?

    --
    Keith





      My System SpecsSystem Spec

  2. #2


    klumsy@gmail.com Guest

    Re: PowerShell MAML Tools?

    i personally decided NOT to try to read the maml, but rather use
    get-help, and parse the powershell objects that are returned by them,
    which in itself is tedious, but its doable.. in powershell analyzer,
    for my rich help.. the code that actually does it is in powershell
    code, rather than C#

    see this blog entry for a screenshot of what i am producing from
    processing the get-help objects that are returned

    http://www.karlprosser.com/coder/?p=61


      My System SpecsSystem Spec

  3. #3


    Keith Hill [MVP] Guest

    Re: PowerShell MAML Tools?

    <klumsy@gmail.com> wrote in message
    news:1165540604.533112.84990@80g2000cwy.googlegroups.com...
    >i personally decided NOT to try to read the maml, but rather use
    > get-help, and parse the powershell objects that are returned by them,
    > which in itself is tedious, but its doable.. in powershell analyzer,
    > for my rich help.. the code that actually does it is in powershell
    > code, rather than C#
    >
    > see this blog entry for a screenshot of what i am producing from
    > processing the get-help objects that are returned
    >
    > http://www.karlprosser.com/coder/?p=61
    >


    Problem is that I'm trying to generate help for the PSCX cmdlets, so I'd
    have to have the MAML first before I could get Get-Help to spit out those
    help objects. :-)

    4> Get-Help Format-Xml
    Get-Help : Cannot find Help for topic "Format-Xml".
    At line:1 char:9
    + Get-Help <<<< Format-Xml

    --
    Keith



      My System SpecsSystem Spec

  4. #4


    Maximilian Hänel Guest

    Re: PowerShell MAML Tools?

    Hi Keith,

    > Problem is that I'm trying to generate help for the PSCX cmdlets, so I'd
    > have to have the MAML first before I could get Get-Help to spit out those
    > help objects. :-)


    Yepp, writing PS/MAML help files is a very tedious job and I was quite
    suprised that PS doesn't even creates the (IMHO most important) SYNTAX
    section on the fly by using refection on the CmdLet.
    It's too easy to forget a little parameter...

    cu

    Max

      My System SpecsSystem Spec

  5. #5


    Krishna Vutukuri[MSFT] Guest

    Re: PowerShell MAML Tools?

    Hi Keith,

    I agree creating help files is tedious today. We are thinking about
    improving this user experience. Internally we use a InfoPath based tool to
    document help content like Parameters, Description,Examples,Notes etc. We
    use the same database to generate cmdlets (defining Parameters) as well as
    help conent in Maml foramt.

    --
    Krishna[MSFT]
    Windows PowerShell Team
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Maximilian Hänel" <ngSpam@smjh.de> wrote in message
    news:%23p1JsSnGHHA.5020@TK2MSFTNGP03.phx.gbl...
    > Hi Keith,
    >
    >> Problem is that I'm trying to generate help for the PSCX cmdlets, so I'd
    >> have to have the MAML first before I could get Get-Help to spit out those
    >> help objects. :-)

    >
    > Yepp, writing PS/MAML help files is a very tedious job and I was quite
    > suprised that PS doesn't even creates the (IMHO most important) SYNTAX
    > section on the fly by using refection on the CmdLet.
    > It's too easy to forget a little parameter...
    >
    > cu
    >
    > Max




      My System SpecsSystem Spec

  6. #6


    Keith Hill [MVP] Guest

    Re: PowerShell MAML Tools?

    "Krishna Vutukuri[MSFT]" <kriscv@online.microsoft.com> wrote in message
    news:O9z9SByGHHA.4712@TK2MSFTNGP04.phx.gbl...
    > Hi Keith,
    >
    > I agree creating help files is tedious today. We are thinking about
    > improving this user experience. Internally we use a InfoPath based tool to
    > document help content like Parameters, Description,Examples,Notes etc. We
    > use the same database to generate cmdlets (defining Parameters) as well as
    > help conent in Maml foramt.
    >


    FYI in the PSCX 1.0 release there is a new Get-CmdletMaml cmdlet that
    reflects upon a snapin assembly and generates the PowerShell MAML for the
    assembly using type information and PowerShell attributes. If if you use a
    few .NET attributes (DescriptionAttribute and DefaultValueAttribute) as well
    as a few PSCX attributes (DetailedDescriptionAttribute,
    AcceptsWildcardsAttribute and RelatedLinksAttribute) you can get pretty a
    decent help file. There isn't support for Notes and Examples though in this
    release. Still, using the -All parameter it will spit out the MAML for
    these sections which you can then fill in manually. Or perhaps using some
    XSLT wizardy (be sure to check out the PSCX Convert-Xml cmdlet for XSLT
    transforms).

    --
    Keith



      My System SpecsSystem Spec

PowerShell MAML Tools? problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Exchange and Quest tools in powershell Goonbreath PowerShell 3 30 Mar 2010
MAML XSLT and XSD? Hal Rottenberg PowerShell 1 02 Sep 2007
Generating documentation for script code (MAML?) Serge van den Oever [Macaw] PowerShell 1 08 Feb 2007
Can't move Administrative Tools to System Tools? Noozer Vista installation & setup 4 17 Oct 2006
Mandatory Integrity Control (MIC) tools? Biba tools? Sharon2323 Vista security 1 04 Aug 2006