

Updating help for the PSReadLine module
source link: https://devblogs.microsoft.com/powershell/updating-help-for-the-psreadline-module/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Updating help for the PSReadLine module
November 4th, 2020
Updating help for the PSReadLine module
You may have noticed an error message when trying to update the help for the PSReadLine module.
In the example above, I am trying to update help for the PSReadLine module on my Windows computer. Take a close look at the error message. Notice the spelling of the module name in the message:
Failed to update Help for the module(s) ‘PSReadline‘
In PowerShell 6 and higher, the PSReadLine module is spelled with a capital L
character. But the
error message is using a lowercase letter.
The root cause of the error
The problem comes from Windows PowerShell 5.1. 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.
The Update-Help
cmdlet constructs the URL of the CAB file containing the updated help. The URL
path is case-sensitive. The updated help files use the new name with the capital L
. PowerShell 6
and higher is installed side-by-side with Windows PowerShell. When you run Update-Help
, the cmdlet
attempts to update the help for both versions of PowerShell. The name of the module that Update-Help
uses is based on the name of the folder where the help is stored. For Windows
PowerShell this is C:\Program Files\WindowsPowerShell\Modules\PSReadline
.
Note that only the update of help for the Windows PowerShell location is failing.
How to fix this problem
Fortunately the fix is simple. Just rename the folder to C:\Program Files\WindowsPowerShell\Modules\PSReadLine
. To rename this folder, you must be sure to
close all Windows PowerShell sessions to release any open file handles on the directory. Use the
Windows File Explorer to rename the file. If you try to rename the folder from the command line, you
receive the following error message.
Rename-Item: Source and destination path must be different.
Sean Wheeler
Sr. Content Developer - PowerShell, Microsoft Developer Relations | Content + Learning
Follow
Recommend
-
5
Announcing PSReadLine 2.1+ with Predictive IntelliSenseJasonNovember 10th, 2020Tab completion has accelerated the success of new and experienced PowerShell users for ove...
-
10
master PSReadLine/PSReadLine/
-
13
You should be customizing your PowerShell Prompt with PSReadLine Sponsored By I use PowerShell 7 (cross platform, open source...
-
14
Updating help for the PSReadLine module in Windows PowerShell 5.1Updating help for the PSReadLine module in Windows PowerShell 5.1
-
11
Adding Predictive IntelliSense to my Windows Terminal PowerShell Prompt with PSReadline Sponsored By I've long said
-
4
PSReadLine 2.2 RC Jason January 31st, 2022 We are pleased to announce the Release Candidate (R...
-
6
我的 如何打造一個華麗又實用的 PowerShell 命令輸入環境 文章 (影片在此) 幫助...
-
4
好看是第一生产力。 — 鲁迅 最终效果如封面。 Windows Terminal基础配置Scoop安装Scoop是一款Windows下的包管理器,不是必须安装的,但是之后的部分配置我是用Sco...
-
9
PSReadLine 2.2.6 enables Predictive Intellisense by default
-
5
Get your most common PowerShell commands by inspecting your PSReadLine history · GitHub Instantly share code, notes, and snippets.
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK