Adding your own help links to ISE

ISE has an F1 help feature, where if you press F1 when your caret is over a cmdlet name, context sensitive help opens.

Shay Levy has a nice post on F1 help in the ISE here
He adds “I wanted to mimic the way ISE’s help works when you press F1 and allow an alias to be expanded to cmdlet name.” and he did it with calling hh.exe on the link

There is an alternative way; Add your own help links to the ISE

You can add to $psLocalHelp and $psOnlineHelp, any key to take you to a help page.

For example,
$psIse.Options.LocalHelp = $false
$psOnlineHelp.Add(“Get-MailBox”, ““)
Get-MailBox (press F1)

Will take you to that page

With that, adding help for aliases comes down to two lines of code,

Get-Command -CommandType alias | %{$psLocalHelp.Add($_, $psLocalHelp[$_.definition])}
Get-Command -CommandType alias | %{$psOnlineHelp.Add($_, $psOnlineHelp[$_.definition])}

Ibrahim Abdul Rahim