PowerShell: update-help fails for 'ConfigDefenderPerformance, PSReadline' -UICulture en-US.
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
When running update-help the following errors are seen… PS C:\Windows\System32> update-help -force Update-Help: Failed to update Help for the module(s) ‘ConfigDefenderPerformance, PSReadline’ with UI culture(s) {en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).). English-US help content is available and can be installed using: Update-Help -UICulture en-US.
running the recommended command produces the same issue PS C:\Windows\System32> update-help -UICulture en-US Update-Help: Failed to update Help for the module(s) ‘ConfigDefenderPerformance, PSReadline’ with UI culture(s) {en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).). English-US help content is available and can be installed using: Update-Help -UICulture en-US.
Expected behavior
The update-help should not be showing these errors;
All the error text (mine is red) leads me to believe update-help as an operation has failed .
Why does the server respond with 404? Where did the help blob go?
Actual behavior
PS C:\Windows\System32> update-help
Update-Help: Failed to update Help for the module(s) 'ConfigDefenderPerformance, PSReadline' with UI culture(s) {en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).).
Error details
PS C:\Windows\System32> Get-Error
Exception :
Type : System.Exception
Message : Failed to update Help for the module(s) 'ConfigDefenderPerformance, PSReadline' with UI culture(s)
{en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does
not exist.).).
English-US help content is available and can be installed using: Update-Help -UICulture en-US.
HResult : -2146233088
CategoryInfo : InvalidOperation: (:) [Update-Help], Exception
FullyQualifiedErrorId : UnknownErrorId,Microsoft.PowerShell.Commands.UpdateHelpCommand
InvocationInfo :
MyCommand : Update-Help
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 10
Line : update-help -UICulture en-US
PositionMessage : At line:1 char:1
+ update-help -UICulture en-US
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : update-help
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :
Environment data
PS C:\Windows\System32> $PSVersionTable
Name Value
---- -----
PSVersion 7.1.5
PSEdition Core
GitCommitId 7.1.5
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS C:\Windows\System32> Get-Host
Name : ConsoleHost
Version : 7.1.5
InstanceId : 846ec299-7473-4bfc-a77d-c75aea9c9931
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Visuals
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 43 (8 by maintainers)
@theJasonHelmick Some sort of block list would provide relief from the symptoms
However the right fix is that any module which ships as part of Windows, but not from the PowerShell team gets its house in order and not ship with a broken link. Having one part of Microsoft shipping things to hide other parts’ bugs is masking the problem not fixing it. If we use
ConfigDefenderPerformance
as an example: it has a link, http://go.microsoft.com/fwlink/?linkid=390762 which gives a 404 error. Either whoever owns that link needs to figure out why it isn’t going to the right place and fixes it OR the ownersConfigDefenderPerformance
need to add something to the next cumulative windows update to move from 1.0 to 1.0.1 and have different, working link . I’m hoping someone from the PowerShell team has filed bugs internally for all the modules known to have broken help links.Masking it while that happens is good (and addresses modules - MSFT or otherwise - which won’t ever get updated) but the masking process needs to handle the link being fixed or a new version being made available.
Try Update-Help -Force -ErrorAction SilentlyContinue
For PSReadline module you need to rename PSReadline to PSReadLine in “C:\Program Files\WindowsPowerShell\Modules” and reload module PSReadLine in PowerShell
For what it’s worth, I have a new work laptop and a new personal laptop and both still have problems updating PowerShell help for several modules, including PSReadLine/PSReadline. The “out-of-box experience” has not changed at all from what I can tell.
The personal laptop is running Windows 11 21H2 (OS Build 22000.739) and still has this problem. The work laptop is running a slightly older build at Windows 10 21H2 (OS Build 19044.1706). So while I’m glad people are paying attention to this (quite old) problem, it’s really not solved in a way that works for end-users on a fresh install. These are the modules that will not update help on pwsh 7.2.5 on my Windows 11 laptop.
They fail because what is displayed and stored in your module path is actually folders with incorrect names, either the module author/owner/microsoft changed name completely or casing (PKI>pki)
PKI should be pki Dism should be DISM ConfigDefenderPerformance should be (even more strange) Defender Kds should be KDS And so on
A work-around is to rename them with their newer name as described here: https://devblogs.microsoft.com/powershell/updating-help-for-the-psreadline-module-in-windows-powershell-5-1/
Note that this will probably only work well for modules with the “wrong” casing, some modules like ConfigDefenderPerformance actually have dead links in their HelpInfoURI in their manifest, so it’s an actual case of 404
issue is tracked here: https://github.com/MicrosoftDocs/windows-powershell-docs/issues/2247
Does anyone know why “ConfigDefenderPerformance, Dism, Get-NetView, Kds, NetQos, PcsvDevice, PKI, Whea, WindowsUpdate” might fail with a 404?
Adding to the list of @ehmiiz items here.
Original Directory Names:
We have the new names:
Where
*
need special treatment as their correct naming can’t be found. Also,Pester
has a good description of the issue here (and how to fix it.)Most of the correct info I got from looking at this page:
Fixing a few of these:
So the reamianing list of items to fix are:
The outdated
Pester
can be partially fixed with adding new version side-by-side:Clearly the update function is case sensitive while someone has been using some weird Camel-case during dev…
@eabase This is not an issue that can be solved by the PowerShell team. This is a problem with the module shipped by the Windows team. For modules that ship in Windows, use the Windows Feedback Hub. For more information, see Send feedback to Microsoft with the Feedback Hub app.
This is a duplicate of the following issues:
This issue occurs for me as well and has on every version of PowerShell I’ve used. It seems to me that the solution to appease users is rather simple:
I honestly don’t care much if a module fails to update. I just want to know the help that COULD be updated HAS been updated. The rest falls on the developers for these modules.
Update-Help -UICulture en-US
when that is the exact command I just ran.At the very least, detect what command I used, and skip this part if they match up.
Here’s my output from 7.3.6 (x64) on Windows 11.
Here’s some additional information in case it is useful.
See also #13591, via https://github.com/MicrosoftDocs/windows-powershell-docs/issues/2247 (thanks, @ehmiiz )
@theJasonHelmick, Thanks, I do think that would be helpful. However, my opinion is that it’s more important to get the help that is available instead of allowing me to hide legitimate messages telling me that I’ve failed to update help that is available. If we are going to do that, we might as well just have
Update-Help
ignore all errors. An example of a module that might wind up on the “block list” when it shouldn’t be there is PSRead(L|l)ine. People would be really tempted to add it just to make the errors go away, but this would be a disservice to the community because that help is actually available. Our fix should make the help available, not just let users ignore the error telling them that PowerShell failed to get the update for them.To be more specific, in addition to giving options to squelch errors, I think it would be good to add more little intelligence to how potential upgrade modules are matched. Let me explain a proposal as a starting point for discussion.
Suppose that there is a signed module from author X called Abc, with version 1, and another signed module, also from author X, called ABC, with version 2. In this case, if you ask PowerShell to find modules named
abc
, it will tell you about both of these versions, even thoughabc
does not match the case of either release. Using everyone’s favorite example, PSRead(L|l)ine, I can search forpsreadline
in lower case and get back matches that are not lowercase, even in Linux:It is an inconsistent user experience to have this consistently case-insensitive policy changed when we run
Update-Help
.So I think that the best solution has two parts:
Update-Help
case-insensitive with respect to module names, so thatPSReadline
matchesPSReadLine
, as it should in the context of the PowerShell user experience; andUpdate-Help
.The end state would be that if I have help installed for
PSReadline 2.0.0
and there is help available forPSReadLine 2.1.0
, runningUpdate-Help -Module PSReadLine
should succeed (no matter how the user capitalizesPSReadLine
) and there should be a list of known “offenders” thatUpdate-Help
will not generate errors for if they fail to process successfully, with users able to append to that list.I’m investigating ways to improve the situation with Update-Help, so let me ask here: what if there was a way you could easily configure a ‘block’ list to prevent retrying an update for missing modules. The error messages would remain the same. This configurable list may initially ship with the modules that we know will not be updated in the future. You can add additional modules if that is needed. Would that be helpful?
@meyerovb
The module
ConfigDefenderPerformance
is included with Windows PowerShell , not bundled with PowerShell 7 If you doget-module -list ConfigDefenderPerformance | fl *
You’ll see the path to module is underC:\Windows\system32\WindowsPowerShell\v1.0\Modules\
and help info URI for the module is http://go.microsoft.com/fwlink/?linkid=390762 but if you go to that link it returns a 404 error. When update help tries to find the help files it gets the same 404 error and that is what you are seeing.
Some other modules bundled with Windows do the same (I listed ones I know about above). The way to raise problems with these is via the Windows 10/11 feedback hub but that is slow to get any response, and the PowerShell team should report these ti the team which contributes the module to Windows - @daxian-dbw I think you have reported some has anyone done the exercise of adding all Windows components, and running
update-help
from PowerShell 7, and logging bugs with other MSFT teams whose components don’t download help successfully ? It’s a really boring job but it would do a lot for the perception of quality.I do suggest opening up an issue in the PSReadLine repo as that we can definitely fix. Marking as enhancement for the suggestion for catching the 404 error.
PSReadline Ships with PowerShell itself and really should be tidied up. It has it’s own repo and it might be good to cross post there.
Config Defender Performance is delivered as a part of Windows and depending on OS version the list of modules missing help will vary. My Windows 11 machine lists ConfigDefenderPerformance, Dism, Get-NetView, Kds, NetQos, PcsvDevice, PKI, Whea and WindowsUpdate as missing in 7.2.2 and 5.1 adds ConfigDefender, HostNetworkingService, StorageBusCache, VMDirectStorage - which I’m assuming PowerShell 7 won’t load. For a few that I’ve checked, the stub help that is present has a link to the web page with the help so it has been written, it just can’t be downloaded locally.
Sadly this has been the case for a long time, and the chances of the PowerShell team getting the various Microsoft teams who deliver modules to do their jobs properly were never good, and seem to have grown worse.