Powershell

This is for use with Gaurhoth’s “New-HtmlHelp from VMWare modification” script, although it should work just fine with VMware’s original version.  The New-HtmlHelp script extracts all of the help files from your installed snapins and outputs them to disk in a pretty HTML version complete with index (using frames but hey nobody’s perfect).

My Get-HtmlHelp script simply allows you to go straight to the help for a particular cmdlet (like Get-Help), by opening it in your default web browser.  My script assumes you’ve got a sub-folder under your (split-path $profile) folder called “help” but you can change that to whatever.

function Get-HtmlHelp ($Cmdlet) {
    if ( Get-Command $cmdlet -ea 0 ) {
        $helpdir = Join-Path -Path (Split-Path $profile) -ChildPath "help"
        Invoke-Item ( Join-Path -Path $helpdir -ChildPath "$Cmdlet.html" )
    }
    else { Write-Error "No such cmdlet exists, so sorry for you!" }
}

: http://halr9000.com/article/494

Post a comment now » Sorry, the comments are closed.

No comments yet.

Sorry, the comment form is closed at this time.

  • Microblog

  • Recent Posts

  • Recent Comments

  • meta