首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >powershell更新-帮助失败

powershell更新-帮助失败
EN

Stack Overflow用户
提问于 2018-10-11 06:04:34
回答 2查看 3.8K关注 0票数 3

我刚开始从微软虚拟学院学习PowerShell,我正在运行其中的一个命令。而在他们这一端,我的却不起作用。我确实四处寻找了这个问题的解决方案。我只是不知道哪里出了问题。任何技巧都会对这个新的PowerShell学习者有所帮助。

代码语言:javascript
复制
PS C:\Windows\system32> Update-Help -Force
Update-Help : Failed to update Help for the module(s) '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 -Force
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : UnableToRetrieveHelpInfoXml,Microsoft.PowerShell.Commands.UpdateHelpCommand

PS C:\Windows\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17134.228
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.228
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-10-11 08:45:27

同意,这应该是一个SuperUser帖子,但既然它在这里。

这种类型的错误很常见,而且在大多数情况下都是意料之中的。

由于各种原因,并不是所有的帮助文件都会按预期进行更新,大多数情况下它都会与更新链接相关联。如您的错误消息中所示。

许多模块要么没有可更新的联机帮助,要么URL已被删除。

可以安全地忽略这些类型的错误。它们不会影响PS的功能或使用。

代码语言:javascript
复制
Get-Module -ListAvailable | Where HelpInfoUri | Update-Help

或者,如果你想看到所有的消息来回传递,做……

代码语言:javascript
复制
Update-Help -Force -Verbose -ErrorAction SilentlyContinue

# Results

VERBOSE: Resolving URI: "http://go.microsoft.com/fwlink/?linkid=390758"
VERBOSE: Your connection has been redirected to the following URI: "http://download.microsoft.com/download/0/1/C/01CCC594-2F13-40E8-98FE-185486228BF4/"
VERBOSE: Performing the operation "Update-Help" on target "CimCmdlets, Current Version: 5.0.0.0, Available Version: 5.0.0.0, UICulture: en-US".

如果您想以更易读的方式查看完整的错误消息,请执行以下操作...

代码语言:javascript
复制
Update-Help -Force -Ea 0 -Ev ErrMsgDetail
$ErrorMsgDetail.Exception

Failed to update Help for the module(s) 'AnyBox' with UI culture(s) {en-US} : Unable to connect to Help content. The server on which Help content is stored might not be available. 
Verify that the server is available, or wait until the server is back online, and then try the command again.

Failed to update Help for the module(s) 'HostNetworkingService, 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.
票数 5
EN

Stack Overflow用户

发布于 2021-06-16 22:14:10

我是Powershell的新手,我发现这解决了我的问题。

reference link

代码语言:javascript
复制
Update-Help -Verbose -Force -ErrorAction SilentlyContinue
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52749398

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档