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.
The post Updating help for the PSReadLine module in Windows PowerShell 5.1 appeared first on PowerShell Team.