powershell gh 命令在运行 update-hlp 后失败

问题描述 投票:0回答:1

Powershell 有点新,尝试使用 get-help about-scripts 或任何 about 命令,所有 update-help 都失败并出现此错误..

update-help : Failed to update Help for the module(s) 'ConfigDefender, ConfigDefenderPerformance, DefenderPerformance, Dism, Get-NetView, Kds, NetQos, PcsvDevice, Pester, PKI, StorageBusCache, VMDirectStorage, Whea, WindowsUpdate' 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

update-help about-scripts fails with this error:

get-help : Get-Help could not find about-scripts in a help file in this session. To download updated help topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at https:/go.microsoft.com/fwlink/?LinkID=107116.
At line:1 char:1
+ get-help about-scripts
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
    + FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand

欢迎任何想法或建议。谢谢。

在 Windows 11 上的 powershell 5.1 中尝试获取有关脚本的帮助并收到消息

get-help : Get-Help could not find about-scripts in a help file in this session. To download updated help topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at https:/go.microsoft.com/fwlink/?LinkID=107116.
At line:1 char:1
+ get-help about-scripts
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
    + FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand

尝试运行更新帮助并获得

update-help : Failed to update Help for the module(s) 'ConfigDefender, ConfigDefenderPerformance, DefenderPerformance, Dism, Get-NetView, Kds, NetQos, PcsvDevice, Pester, PKI, StorageBusCache, VMDirectStorage, Whea, WindowsUpdate' 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
5.1
powershell
1个回答
0
投票
  • 您正在寻找概念性的 about_Scripts 帮助主题,您将其拼错为

    about-scripts
    -
    而不是
    _
    )。

    • 请注意,您可以将 wildcards
      Get-Help
      /
      help
      一起使用,因此您可以使用
      Get-Help *scripts*
      找到正确的标题,例如(如果只有 one 匹配,则立即显示匹配的主题;否则,你会得到一个匹配主题的list)。
  • 概念性帮助主题(标题为

    about_*
    的)无法单独更新,
    Update-Help
    需要一个或多个已安装的modules的名称。

  • Update-Help
    可能会失败,如果目标模块没有链接到与之关联的可下载在线帮助资源,或者这些链接不再有效。

    • 有关Update-Help
      的其他信息,请参阅
      此答案
© www.soinside.com 2019 - 2024. All rights reserved.