首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Powershell更新失败

Powershell更新失败
EN

Stack Overflow用户
提问于 2016-10-03 14:50:30
回答 3查看 21.1K关注 0票数 24

当我运行Update-Help时,它在Powershell中失败。我不会通过代理的。这是直接访问。我还作为一个管理员运行Powershell。我不知道还能查什么.欢迎任何建议。

这是我的版本。

代码语言:javascript
复制
$PSVersionTable

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

以下是错误:

代码语言:javascript
复制
PS C:\Windows> Update-Help
Update-Help : Failed to update Help for the module(s) : 
'AppBackgroundTask, AppLocker, AppvClient, Appx, AssignedAccess, BitLocker, BitsTransfer, BranchCache, CimCmdlets, ConfigCI, Defender, DirectAccessClientComponents, Dism, 
DnsClient, EventTracingManagement, International, iSCSI, ISE, Kds, Microsoft.PowerShell.Archive, Microsoft.PowerShell.Core, Microsoft.PowerShell.Diagnostics, 
Microsoft.PowerShell.Host, Microsoft.PowerShell.LocalAccounts, Microsoft.PowerShell.Management, Microsoft.PowerShell.ODataUtils, Microsoft.PowerShell.Security, 
Microsoft.PowerShell.Utility, Microsoft.WSMan.Management, MMAgent, MsDtc, MSMQ, NetAdapter, NetConnection, NetEventPacketCapture, NetLbfo, NetNat, NetQos, NetSecurity, 
NetSwitchTeam, NetTCPIP, NetworkConnectivityStatus, NetworkSwitchManager, NetworkTransition, PackageManagement, PcsvDevice, PKI, PnpDevice, PowerShellGet, PrintManagement, 
PSDesiredStateConfiguration, PSReadline, PSScheduledJob, PSWorkflow, PSWorkflowUtility, ScheduledTasks, SmbShare, SmbWitness, StartLayout, Storage, TLS, TroubleshootingPack, 
TrustedPlatformModule, UEV, VpnClient, Wdac, WindowsDeveloperLicense, WindowsErrorReporting, WindowsSearch, WindowsUpdate'
Access is denied. The command could not update Help topics for the Windows PowerShell core modules, or for any modules in the $pshome\Modules directory. To update these Help 
topics, start Windows PowerShell by using the "Run as Administrator" command, and try running Update-Help again.
At line:1 char:1
+ Update-Help
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : UpdatableHelpSystemRequiresElevation,Microsoft.PowerShell.Commands.UpdateHelpCommand

Update-Help : Failed to update Help for the module(s) 'Microsoft.PowerShell.Operation.Validation' with UI culture(s) {en-US} : The value of the HelpInfoUri key in the module 
manifest must resolve to a container or root URL on a website where the help files are stored. The HelpInfoUri 'https://www.msn.com/?ocid=NEFLS000' does not resolve to a 
container.
At line:1 char:1
+ Update-Help
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : InvalidHelpInfoUri,Microsoft.PowerShell.Commands.UpdateHelpCommand

Update-Help : Failed to update Help for the module(s) 'SecureBoot' 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

我重新运行了Update-Help。我认为它更新了其中的大部分。我只知道这些错误。

代码语言:javascript
复制
Update-Help : Failed to update Help for the module(s) 'Microsoft.PowerShell.Operation.Validation' with UI culture(s) {en-US} : The value of the HelpInfoUri 
key in the module manifest must resolve to a container or root URL on a website where the help files are stored. The HelpInfoUri 
'https://www.msn.com/?ocid=NEFLS000' does not resolve to a container.
At line:1 char:1
+ Update-Help
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : InvalidHelpInfoUri,Microsoft.PowerShell.Commands.UpdateHelpCommand

Update-Help : Failed to update Help for the module(s) 'AppvClient' with UI culture(s) {en-US} : Help content cannot be found. Make sure the server is 
available and the help content location is properly defined in the HelpInfo XML.
At line:1 char:1
+ Update-Help
+ ~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : HelpContentNotFound,Microsoft.PowerShell.Commands.UpdateHelpCommand

Update-Help : Failed to update Help for the module(s) 'SecureBoot' 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
EN

回答 3

Stack Overflow用户

发布于 2017-04-10 05:22:31

解决方案:

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

-verbose将输出任何命令,-force将强制完成脚本,即使在两者之间发生错误,-ErrorAction SilentlyContinue也会执行类似的操作。

简单地说,模块仍然不会得到更新,而这些模块之前没有更新。

票数 28
EN

Stack Overflow用户

发布于 2017-06-02 16:51:17

更新-帮助最初失败,但当以管理员身份运行时,成功。

票数 3
EN

Stack Overflow用户

发布于 2021-02-18 19:16:07

更新-帮助-verbose -force -erroraction沉默地继续

您可以使用此命令,不会生成错误。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39834452

复制
相关文章

相似问题

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