Repository navigation
Description
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 #failsExpected 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.coreActual 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
Activity
Jaykul commentedon Aug 31, 2020
This has been asked before. It would be nice if it didn't get closed this time (see #10306). Maybe we can just agree on some format for embedding the URLs into
about_*.txtfiles (orabout*_.md?) as part of the markdown help stories?iSazonov commentedon Aug 31, 2020
We add a comment header #11205 (comment) with meta information.
If we switched to Markdown it would be more simple.
TobiasPSP commentedon Aug 31, 2020
Adding a comment to the about topics with the URI seems to be a great workaround until eventually there is a switch to md format.
yecril71pl commentedon Nov 9, 2020
What do you mean by that? The comment says we could add…
By the English grammar (We drink tea every morning), it looks like we added it every day, only to be undone overnight, hence no progress ☹
Jaykul commentedon Nov 21, 2020
Andy (@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.
deadlydog commentedon Nov 24, 2020
Just an FYI for others that come across this and think about defaulting Get-Help -Online to $true, it currently breaks VS Code. See this issue for more info.
mklement0 commentedon Sep 24, 2021
Sean Wheeler (@sdwheeler) states in MicrosoftDocs/PowerShell-Docs#2939 (comment) 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-Helpfunction that is essentially a wrapper forGet-Help -Online, but it supportsabout_*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:
See also these related suggestions:
I've also created helper functions for these; here are all three installation commands:
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
Jaykul commentedon Nov 16, 2023
This one really should not be closed -- instead, it should be implemented.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.