question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Online support for about_... help topics

See original GitHub issue

Get-Help can display both locally cached help files and online resources. Since online resources do not require prerequisites like Update-Help and are always up-to-date, and since online resources are much better formatted and include navigation to discover related items, a “Copy” button to copy&paste sample code, and more, many users default to using online help, i.e. by adding this to their profile:

$PSDefaultParameterValues.Add("Get-Help:Online",$true)

Now, without any prerequisites, users can easily display cmdlet help in an extra window like so:

dir -?
Get-Process -?

However, Get-Help -Online can only show help topics with a dedicated URI property. That’s why all about_… topics fail to display even though there are online versions available.

Steps to reproduce

help Get-process -Online # works
help about_for -Online #fails

Expected behavior

When Get-Help is used with -Online, it should detect whether the requested help starts with about_ and then construct the appropriate URI rather than fail. This could be done with a hard-coded topic list to include only the MSFT about_ topics, or simply done heuristically with the potential of failing for about topics from 3rd party.

If all else fails and there is no match, Get-Help -Online should default to the PowerShell documentation home page: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core This would enable users to try and search there rather than being left with a red exception.

Get-Help about_for -Online # should open https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_for
Get-Help about_doesnotexist -Online # should open https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core

Actual behavior

Get-Help -Online fails for any topic that has no distinct URI property

Environment data


Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mklement0commented, Sep 24, 2021

@sdwheeler states in https://github.com/MicrosoftDocs/PowerShell-Docs/issues/2939#issuecomment-926874648 that the about_* help source files have now been updated with URL information; alas, the downloaded versions still lack this information.

As a temporary workaround, the following may be of interest:

I’ve created a Show-Help function that is essentially a wrapper for Get-Help -Online, but it supports about_* topics too, whose URLs it constructs behind the scenes; e.g. Show-Help about_pwsh (tab-completion supported).

It’s available from an MIT-licensed Gist - assuming you have looked at the code (which I can personally assure you is safe, but you should always check), you can install it directly:

irm https://gist.github.com/mklement0/880624fd665073bb439dfff5d71da886/raw/Show-Help.ps1 | iex

See also these related suggestions:

I’ve also created helper functions for these; here are all three installation commands:

# Show-Help function (wrapper for Get-Help -Online with support for about_* topics); e.g.
#     Show-Help about_pwsh
#     Show-Help about_Automatic_Variables PSItem
irm https://gist.github.com/mklement0/880624fd665073bb439dfff5d71da886/raw/Show-Help.ps1 | iex

# Show-OperatorHelp function (online help for PowerShell's operators; e.g.
#    Show-OperatorHelp replace
irm https://gist.github.com/mklement0/146f3202a810a74cb54a2d353ee4003f/raw/Show-OperatorHelp.ps1 | iex

# Show-TypeHelp function (online documentation for .NET types and instances); e.g.
#    Show-TypeHelp regex
#    Show-TypeHelp datetime tostring
irm https://gist.github.com/mklement0/50a1b101cd53978cd147b4b138fe6ef4/raw/Show-TypeHelp.ps1 | iex
1reaction
Jaykulcommented, Nov 21, 2020

@AndASM your problem is you’re trying to get help for a module you can’t import – please start a new issue instead of hijacking this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Supporting Online Help - PowerShell
To help users find the online help topics for commands, ... You can support Get-Help -Online for any command by adding a valid...
Read more >
Google Assistant Help
Official Google Assistant Help Center where you can find tips and tutorials on using Google Assistant and other answers to frequently ... Browse...
Read more >
Google Chrome Help
Official Google Chrome Help Center where you can find tips and tutorials on using Google Chrome and other answers ... Browse help topics...
Read more >
Is `Get-Help -online` in powershell supposed to work on ...
1 Answer 1 · Online support for about_... help topics #13550 · Add Get-Help -Online support for the about_ topics #16452.
Read more >
Amazon Customer Service: Help & Contact Us
Visit the Amazon Customer Service site to find answers to common problems, use online chat, or call customer service phone number at 1-888-280-4331...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found