Uncategorized

New-HtmlHelp

We noticed the Documentation One Liner topic over on the Windows PowerShell group’s blog. We don’t have a one-liner but we do have a little script that Angel, one of the team members, wrote to tackle the same problem. We chose to map the help into HTML in a javadoc-ish format. Below, you can see a little sample of applying it to one of the core cmdlets. Click on the image to see full size.

Here are the script and stylesheet: Download doc-style.css Download New-HtmlHelp.ps1

Usage: New-HtmlHelp [commands for which to generate help] [target directory] [title]

Example: New-HtmlHelp (get-command -pssnapin microsoft.powershell.management) ./cmdletHelp "Management Cmdlets"

Then open ./cmdletHelp/index.html in a browser. To complete it, create a web page that describes the package in the ./cmdletHelp/right-frame.html file.

This script is a quick-and-dirty hack and makes some assumptions that are valid for our environment. In other words: It works for us. YMMV. Note: the script as attached isn’t signed. Please read it over and validate it for yourself. If you add any improvements, we’d certainly appreciate a link to them. 🙂

Helpsnippet_5