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/
没有评论