12

On my computer (Win10 Enterprise x64, 1709) running Update-Help returns two errors:

update-help : Failed to update Help for the module(s) 'AutoSequencer, 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.

At line:1 char:1 + update-help + ~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (:) [Update-Help], Exception + FullyQualifiedErrorId : UnableToRetrieveHelpInfoXml,Microsoft.PowerShell.Commands.UpdateHelpCommand

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

At line:1 char:1 + update-help + ~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Update-Help], Exception + FullyQualifiedErrorId : UnableToConnect,Microsoft.PowerShell.Commands.UpdateHelpCommand

This is a problem because I'm scripting windows updates for the first time and having the help files for WindowsUpdateProvider is kind of important. Even if I knew how to find and fix the "HelpInfoUri" property, I wouldn't know what to set it to - a Google search for "WindowsUpdateProvider help" mostly returns people asking about this problem in various languages, with no solutions I can see. This likewise means I can't work around the problem by using online help. (Get-Help WindowsUpdateProvider -online returns a similar error.)

I am aware of the "PSWindowsUpdate" module but due to our processes, using a module that ships with Windows 10 would be preferable.

0

5 Answers 5

1

This is not unusual. It has happen to me many times. Since the first release of PowerShell/Monad.

So, don't stress over this, because you normally can't fix it (many times only the author can), and use the online web help version for the module that have issues, if there is any of course.

Not all modules have updatable help, or there are issues with the associated manifest, help links files.

So, as noted by the PimpJuiceIT, just use that command to ignore the error.

0
6

I stumbled upon the Failed to update Help for the module(s)~ TechNet post after trying this and getting the exact same result as you.

After running with the syntax below once I read over that post before I elevated the PowerShell prompt, this gave me the needed detail of what the issue was and how to resolve.

Two Part Solution

  1. Run PowerShell elevated as administrator
  2. Run this PowerShell command syntax:

    Update-Help  -Force -Ea 0 -Ev what
    $what.Exception
    

    source


The Error (using -ErrorAction [-Ea] and -ErrorVariable [-Ev])

  • Failed to update Help for the module(s) : '<List of Modules>~' 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. Failed to update Help for the module(s) ~


Further Resources

  • Update-Help
  • Common Parameters

    • ErrorAction

      • The -ErrorAction common parameter allows you to specify which action to take if a command fails. The available options are: Stop, Continue, SilentlyContinue, Ignore, or Inquire. If you’re developing a Windows PowerShell workflow, you can also use the Suspend value. However, advanced functions cannot be suspended.

        When you specify the ErrorAction parameter during a call to a command, the specified behavior will override the $ErrorActionPreference variable in Windows PowerShell. This variable is part of a handful of variables known as “preference variables.” By default, Windows PowerShell uses an error action preference of Continue, which means that errors will be written out to the host, but the script will continue to execute.

        source

    • ErrorVariable

      • Normally, if you run a Windows PowerShell command and an error occurs, the error record will be appended to the “automatic variable” named $error. When you use the -ErrorVariable parameter in a call to a command, the error is assigned to the variable name that you specify. It’s important to note that even when you use the -ErrorVariable parameter, the $error variable is still updated.

        source

1
  • 1
    So it looks like you are instructing Powershell to take no action if updating the help fails, and you are storing the error information in a variable called $what Thank you Commented Apr 3, 2019 at 16:50
2

Quoting dsolodow, issue #139 from the PowerShell docs on GitHub:

No, there isn't a fix for the missing help yet. However, most of the cmdlets in this module don't have any real options and just return a true/false or a date time.

I personally like the workaround below which carries on running and doesn't stop on the error, but give you the errors at the end. It was suggested by Alo Press in this Technet discussion.

Update-Help  -Force -Ea 0 -Ev what
$what.Exception
1

Better use:

$modules = Get-Module -ListAvailable

foreach ($module in $modules) {
    Write-Output $module
    Update-Help -Module $module -ErrorAction Continue
}
3
  • 3
    Welcome to Super User. Can you please edit your answer to explain what it does and how you envision it solving the OP's problem? Commented Sep 15, 2018 at 3:52
  • 2
    Welcome to superuser: This may answer the question (an answer has been accepted so would work for the OP) You have to explain with detail why it will work and work better. Please take a couple of minutes and read:- How to Answer, again welcome to superuser.Thankyou
    – mic84
    Commented Sep 15, 2018 at 7:15
  • This tries to do updates for modules that don't support updatable help, resulting in way more errors than the 1 OP was getting. Commented Apr 29, 2019 at 20:43
1

The main issue (among others) is that MS refuses to fix the case dependence of the module directories. They are basically shipped with the wrong case of the directory names and you need to rename them manually. Some of the "update-help" issues are tracked in the powershell repo, but have all been bot closed. Some people have stated a few hack solutions.

For example, to fix: Dism, Kds, NetQos, PcsvDevice, Pester, PKI, Whea, you can do this:

Rename-Item -Path "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PKI" -NewName "pki" -Force
Rename-Item -Path "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Kds" -NewName "KDS" -Force
Rename-Item -Path "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Dism" -NewName "DISM" -Force
Rename-Item -Path "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PcsvDevice" -NewName "PCSVDevice" -Force
Rename-Item -Path "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\NetQos" -NewName "NetQoS" -Force
Rename-Item -Path "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Whea" -NewName "WHEA" -Force


# Install a new version of Pester in parallel
Install-Module -Name Pester -Force -SkipPublisherCheck

To see all new errors use:

$modules = Get-Module -ListAvailable
foreach ($module in $modules) {
    Write-Output $module
    Update-Help -Module $module -EA 0 -EV what
    Write-Host -f DarkYellow $what.Exception
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .