Updating help for the PSReadLine module in Windows PowerShell 5.1
Back in November of 2020 I posted instructions about how to work around the problem of updating the help for the PSReadLine module.
The version of the PSReadline module that shipped in Windows PowerShell 5.1 used a lowercase
letter in the name. The name of the module was changed for the release of PowerShell 6. It now uses
a capital L
in the name. And even after following the instructions in the previous post, you still
get the same error when you try to update help for Windows PowerShell 5.1.
Failed to update Help for the module(s) ‘PSReadline‘
The root problem in Windows PowerShell 5.1 is that the module is automatically loaded at startup
using the PSReadline name (with the lowercase l
). Use the following steps workaround this
problem and update the help.
- Close all
powershell.exe
processes. Then rename the PSReadline module folder name to PSReadLine. - Open an
powershell.exe
session in Administrator privilege. - Run
Remove-Module PSReadLine
to remove the auto-loaded PSReadLine module. - Run
Import-Module PSReadLine
(use PSReadLine with capitalL
). - Then run
Update-Help -Module PSReadLine -Force
These steps load the module in your session using the new name, which allows Update-Help
to use the
correct name to find the help content.
2 comments
One drawback is, that the about_psreadline will now be doubled and i dont find a way to access it:
PS C:\Windows\System32\WindowsPowerShell\v1.0> get-help psreadline
Name Category Module Synopsis
—- ——– —— ——–
Set-PSReadLineOption Cmdlet PSReadLine Customizes the behavior of command line editin…
Set-PSReadLineKeyHandler Cmdlet PSReadLine Binds keys to user-defined or PSReadLine key h…
Remove-PSReadLineKeyHandler Cmdlet PSReadLine Removes a key binding.
Get-PSReadLineOption Cmdlet PSReadLine Gets values for the options that can be config…
Get-PSReadLineKeyHandler Cmdlet PSReadLine Gets the bound key functions for the PSReadLin…
about_PSReadline HelpFile
about_PSReadLine HelpFile
Get-Help about_psreadline now returns only this:
Name Category Module Synopsis
—- ——– —— ——–
about_PSReadline HelpFile
about_PSReadLine HelpFile
Any clew on this?
You have to manually delete the old help from the old location.