O'Reilly logo

Learn PowerShell Toolmaking in a Month of Lunches by Don Jones and Jeffrey Hicks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.1. Comment-based help

Right now, if we try to ask the help system for assistance with our Get-SystemInfo function, we’ll get something like this:

NAME
    Get-SystemInfo

SYNTAX
    Get-SystemInfo [-ComputerName] <string[]> [[-ErrorLog] <string>]
    [-LogErrors]
    [<CommonParameters>]

ALIASES
    None

REMARKS
    Get-Help cannot find the Help files for this cmdlet on this computer.
    It is
    displaying only partial help.
        -- To download and install Help files for the module that includes
         this
    cmdlet, use Update-Help.

Not so helpful, really. In fact, it’s downright wrong, because despite what it says, running Update-Help won’t do anything to give our function better-looking, more-complete help. Fortunately, there’s an easy fix, shown in the following listing.

Listing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required