VM Junkie

April 7, 2009

Graphical help for VI Toolkit – Get-VITKHelp

Filed under: esx, microsoft, powershell, Uncategorized, vmware — ermac318 @ 3:25 pm

Just quickie here. The Microsoft ScriptCenter guys did something cool by providing a graphical help file for PowerShell along with a cool Get-GUIHelp function that let you jump straight to the help file from the command line. I modified their script (made it a lot shorter) and made it work with the VI Toolkit Reference Guide that’s provided with the Toolkit. If you are using the toolkit on an x64 machine, you may have to futz with the paths, but you should be able to figure it out:

function Get-VITKHelp
{
   {$a = "HH.EXE mk:@MSITStore:C:\Program Files\VMware\Infrastructure\VIToolkitForWindows\VI Toolkit Cmdlets Reference.chm::/VI Toolkit Cmdlets Reference/" + $args[0] + ".html"
   Invoke-Expression $a}
    $a
}

Just add that to your PowerShell $profile and you should be good to go! Just type Get-VITKHelp Get-VM and voila, the GUI Help for Get-VM comes up.

Advertisements

Blog at WordPress.com.

%d bloggers like this: