PowerShell Cookbook

Twitter Updates

    follow me on Twitter

    Search

    Categories

     

    On this page

    Get-Help –Online

    Archive

    Blogroll

    Disclaimer
    I work for Microsoft.

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

    RSS 2.0 | Atom 1.0 | CDF

    Send mail to the author(s) E-mail

    Total Posts: 252
    This Year: 3
    This Month: 0
    This Week: 0
    Comments: 736

    Sign In

     Tuesday, June 09, 2009
    Tuesday, June 09, 2009 6:42:33 PM (Pacific Daylight Time, UTC-07:00) ( )

    In CTP2 of PowerShell v2, we added a new parameter to Get-Help: Online. This parameter lets help authors declare an “online version” of their help topic, which PowerShell then launches with your default browser. For the PowerShell cmdlet help topics, we redirect to the excellent (and more frequently updated) online cmdlet help topics: http://technet.microsoft.com/en-us/library/dd347701.aspx.

    PowerShell supports online help content for both MAML-based help topics (http://msdn.microsoft.com/en-us/library/bb525433(VS.85).aspx, http://blogs.msdn.com/powershell/archive/2006/09/14/Draft-Creating-Cmdlet-Help.aspx, http://blogs.msdn.com/powershell/archive/2008/12/24/powershell-v2-external-maml-help.aspx) and inline help comments (http://technet.microsoft.com/en-us/library/dd819489.aspx.)

    To add support for the –Online parameter to your own cmdlet help, add a maml:navigationLink element with a maml:uri node to the maml:relatedLinks section in your MAML help. The help system uses the first navigation link that contains a URI as the target for the link.

    <maml:relatedLinks>
                  <maml:navigationLink>
                         <maml:linkText>Online version:</maml:linkText>
                         <maml:uri>http://go.microsoft.com/fwlink/?LinkID=113279</maml:uri>
                  </maml:navigationLink>
    (…)
    </maml:relatedLinks>

    When writing comment-based help, use the .LINK tag for the same effect:

    001
    002
    003
    004
    005
    006
    007
    008
    ## .SYNOPSIS
    ## Gets an object from the system
    ## .LINK
    ## http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
    function Get-MyObject
    {
        "Hello!"
    }

    For more information about this feature, see Get-Help Get-Help –Parameter Online.

    Comments [0] | | #