Getting Cmdlet Help No Matter What

by Mar 10, 2015

PowerShell 3.0 and later

Beginning in PowerShell 3.0 PowerShell no longer ships its help files. Instead, you need to download them via Update-Help, and since help files are stored inside the (protected) PowerShell folder, a normal user cannot do this.

Next time you need help for a cmdlet, simply use the online version directly. This gets you the online help for Get-Process in your browser (provided you have at least Internet connectivity):

 
PS> help Get-Process -Online
 

With the help files installed, getting help in the PowerShell ISE is much easier: simply click any cmdlet name, and then press F1.

When you look carefully, you’ll discover that pressing F1 really only enters the help command for you. So if you wanted the same ease of use, but show the online help instead, you could be tempted to define a function like this:

 
function Get-Help($Name) { Get-Help $Name -Online }  
 

However, this would cause an endless loop, because your new function Get-Help would call itself from inside. To make it work you would have to make sure that your function internally calls the original Get-Help cmdlet like so:

 
function Get-Help($Name) { Microsoft.PowerShell.Core\Get-Help $Name -Online } 
 

Once you run this function, you can click any cmdlet name inside the PowerShell ISE, press F1, and be taken to the online page explaining the cmdlet–regardless of installed help files on your local computer.

Twitter This Tip! ReTweet this Tip!