I am running PowerShell Core 7.2.6 installed via homebrew on MacBook Air M1 (12.6). However, when I try to use the help module to find some examples , I get this error.
REMARKS
Get-Help cannot find the Help files for this cmdlet on this computer. It
is displaying only partial help.
-- To download and install Help files for the module that includes
this cmdlet, use Update-Help.
-- To view the Help topic for this cmdlet online, type: "Get-Help
Find-Module -Online" or
go to https://go.microsoft.com/fwlink/?LinkID=398574.
I have tried to update the help module but no luck, same with uninstalling it and reinstalling it.
Note: See Sotiris's helpful answer for the potential need to use
-UICulture en-US, and for specifics on how thePowerShellGetmodule's help is broken.It is implied by the
Get-Helperror message you're seeing, but to spell it out in more detail:The command you're trying to invoke help for is a cmdlet and therefore part of a module.
That module's manifest defines an online help source, via its
HelpInfoURIentry, but no local (offline) help content has ever been downloaded.Install-Moduleusually come bundled with their offline help content.As the error message suggests,
Update-Helpmust be used to download such help content on demand; see the next section for details and general troubleshooting tips.However, the problem in your specific case - trying to invoke local help for the
Find-Modulecmdlet - is that the downloadable help content for the specificPowerShellGetmodule that theFind-Modulecmdlet is a part of appears to be broken as of this writing.If you run the following command, you'll see that
Update-Helpdownloads help content, but it seemingly isn't recognized; that is, runningUpdate-Helpmakes no effective difference.Therefore:
I encourage you to report an issue in
PowerShellGet's GitHub repo.As a workaround - assuming you're connected to the internet - use the
-Onlineswitch for now so as to open the help content in your default web browser (you cannot directly pass-Examplesthen, but just click the "Examples" link on the right-hand side to jump to the examples section).Using and troubleshooting
Update-Help:Note that there is no help module as such (it sounds like you meant the
helpcommand, which is a function wrapper aroundGet-Helpthat provides interactive paging of long output from the latter). There's theGet-Helpcmdlet that is part of theMicrosoft.PowerShell.Coremodule, and there's downloaded help content, which you may have to download on demand viaUpdate-Help:Update-Helpwithout a-Scopeargument in PowerShell (Core) 7+ defaults to-Scope CurrentUser, which means that the help content is downloaded to a user-specific location.With
-Scope AllUsers(the default in Windows PowerShell, where no-Scopeparameter exists), you need to run with elevation (as admin) on Windows, and viasudo powershellon macOS and Linux.Use
-Forceto ensure that content is always downloaded, if available. According to the docs,-Forcebypasses two built-in constraints: permitting only a single run per day, and limiting the download data volume to 1GB (though exceeding that seems unlikely).Add
-Verboseto get details about the operations performed byUpdate-Help, which includes the modules targeted and their online source URLs, as well as whether updated content was found and downloaded.You can also limit
Update-Helpto updating the help for (a) given module(s) (-Module) and/or specific cultures (human languages) (-UICulture).To learn the name of a module that a given command is part of, if any, use the following, using
Get-Contentas an example:(Get-Command Get-Content).Module.Name; note that you must use the actual command name, not an alias for it (such asgc); for an alias, use something like(Get-Command gc).ResolvedCommand.Module.NameBy default, content matching the current UI culture (as reflected in
$PSUICulture) is downloaded; if no such content is available, but the content is available for other UI cultures, the resulting error message will list those.However, even then it isn't guaranteed that help becomes available for all commands available in your session, given that implementing command-line help is optional (though recommended).
If there's no error message when you run
Update-Help -Forceyet no help content becomes available, the implication is that no online source for a module that a given command is part of, if any, is defined.However, if you target such a module explicitly with
-Module, the absence of an online source does result in an error to that effect.It is the
HelpInfoURIentry in a module's manifest that defines an online help source.If an online source is defined, but not reachable / doesn't have the expected content, you'll get an error message.