如何解决Update-Help报错问题?

Windows

1 前言

一个问题,一篇文章,一出故事。
笔者最近升级帮助更新包时遇到更新错误,于是整理此文。

2 最佳实践

2.1 正常的帮助更新命令

Update-Help

如果遇到如下错误,

Update-Help : Failed to update Help for the module(s) 'PSReadline, WindowsUpdateProvider' with UI culture(s) {en-US} :
Unable to retrieve the HelpInfo XML file for UI culture en-US. Make sure the HelpInfoUri property in the module
manifest is valid or check your network connection and then try the command again.
At line:1 char:1
+ Update-Help
+ ~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : UnableToRetrieveHelpInfoXml,Microsoft.PowerShell.Commands.UpdateHelpCommand

2.2 变通的帮助更新命令

Update-Help -Verbose -Force -ErrorAction SilentlyContinue

注:以上是使用容错参数跳过错误的安装包,继续更新其他的帮助包,

参阅文档
==============
https://github.com/MicrosoftDocs/windows-powershell-docs/issues/139
https://devblogs.microsoft.com/powershell/updating-help-for-the-psreadline-module-in-windows-powershell-5-1/

没有评论

发表回复

Windows
如何修改Windows的时区?

1 前言 一个问题,一篇文章,一出故事。 笔者由于需要使用命令设置Windows系统的时区,于是整理 …

Windows
如何熟悉微软的OAuth 2.0和OpenID Connect?

1 OAuth的基础知识 1.1 OAuth的简介 – OAuth即Open Autho …

cmd shell
如何bat免密码登录Windows?

1 前言 一个问题,一篇文章,一出故事。 笔者最近想通过bat自动登录Windows服务器,于是整理 …