powershell 更新帮助失败
powershell update-help fails
我刚开始从 Microsoft 虚拟学院学习 PowerShell,我是 运行 指示的命令之一。而在他们的最后它工作我没有。我确实四处寻找解决这个问题的方法。我只是不知道出了什么问题。任何提示都会对这个新的 PowerShell 学习者有所帮助。
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
同意,这应该是超级用户 post,但既然它在这里。
这种错误很常见,在大多数情况下都是意料之中的。
不是所有的帮助文件,由于各种原因按预期更新,大部分时间都是与link相关的更新。如您的错误消息所示。
许多模块要么没有在线可更新帮助,要么 URL 已被删除。
可以安全地忽略这些错误。它们不会影响 PS 功能或使用。
Get-Module -ListAvailable | Where HelpInfoUri | Update-Help
或者,如果您想查看与此来回交互的所有消息,请执行...
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".
如果您想以更易于阅读的方式查看完整的错误消息,请执行此操作...
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.
我是 Powershell 的新手,发现这解决了我的问题。
Update-Help -Verbose -Force -ErrorAction SilentlyContinue
其实问题也可能与权限有关。至少对我来说是这样。在默认的 Windows 10 安装中,Update-Help
根本不起作用,所有其他带有 -Force
或 -ErrorAction
.
的版本也不起作用
事实证明,同样根据 the official online help,您需要成为管理员才能更新 powershell <6.0 的帮助(Windows 10 默认为 PS5.1)。使用管理员权限启动新的 PowerShell 立即解决了问题,我还可以查看 non-admin.
的帮助
我刚开始从 Microsoft 虚拟学院学习 PowerShell,我是 运行 指示的命令之一。而在他们的最后它工作我没有。我确实四处寻找解决这个问题的方法。我只是不知道出了什么问题。任何提示都会对这个新的 PowerShell 学习者有所帮助。
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
同意,这应该是超级用户 post,但既然它在这里。
这种错误很常见,在大多数情况下都是意料之中的。
不是所有的帮助文件,由于各种原因按预期更新,大部分时间都是与link相关的更新。如您的错误消息所示。
许多模块要么没有在线可更新帮助,要么 URL 已被删除。
可以安全地忽略这些错误。它们不会影响 PS 功能或使用。
Get-Module -ListAvailable | Where HelpInfoUri | Update-Help
或者,如果您想查看与此来回交互的所有消息,请执行...
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".
如果您想以更易于阅读的方式查看完整的错误消息,请执行此操作...
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.
我是 Powershell 的新手,发现这解决了我的问题。
Update-Help -Verbose -Force -ErrorAction SilentlyContinue
其实问题也可能与权限有关。至少对我来说是这样。在默认的 Windows 10 安装中,Update-Help
根本不起作用,所有其他带有 -Force
或 -ErrorAction
.
事实证明,同样根据 the official online help,您需要成为管理员才能更新 powershell <6.0 的帮助(Windows 10 默认为 PS5.1)。使用管理员权限启动新的 PowerShell 立即解决了问题,我还可以查看 non-admin.
的帮助