SOLVED

PowerShell UPDATE-HELP error

Copper Contributor

Dear Community,

I am a complete beginner with MS PowerShell. While making my first steps with PowerShell, I tried to update Help System by means of running UPDATE-HELP cmdlet on my PowerShell 5.1 - but I have gotten the following error message:

 

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

 

Would you be so kind to advise me with solving this issue?

Many thanks in advance!

16 Replies
best response confirmed by kochetov_oleksii (Copper Contributor)
Solution
https://devblogs.microsoft.com/powershell/updating-help-for-the-psreadline-module-in-windows-powersh...

"The root problem in Windows PowerShell 5.1 is that the module is automatically loaded at startup using the PSReadline name (with the lowercase l). Use the following steps workaround this problem and update the help.

Close all powershell.exe processes. Then rename the PSReadline module folder name to PSReadLine.
Open an powershell.exe session in Administrator privilege.
Run Remove-Module PSReadLine to remove the auto-loaded PSReadLine module.
Run Import-Module PSReadLine (use PSReadLine with capital L).
Then run Update-Help -Module PSReadLine -Force
These steps load the module in your session using the new name, which allows Update-Help to use the correct name to find the help content."
Hello @#Harm_Veenstra
Thank you very much for your help. I've followed proposed solution and everything worked smoothly.
BR, Alex (Oleksii)

Hi @Harm_Veenstra 

 

Thanks for your suggestions but unfortunately this steps didn't work for me and getting below error please help with other solutions or how about installing a new version of Powershell which doesn't have this issues I am using WIN Datacenter 2019 server 64bit. with PS version 5.1.17763.592

PFA.

 

Rajeshlanke_0-1675796702208.png

 

 

You have many more modules with this issue in updating the help than just the PSReadline one... Does running "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12" before updating help?

@Harm_Veenstra  No luck ! even I executed below 2 command same issue .. but I would like to confirm this issue will not impact on my Powershell Administrative stuff like running scripts, commands everything will be accessible just If I go for help with that listed command/module  which is currently giving error that i won't able to get info. right?
Also please suggest how about installing a whole new version of Powershell which doesn't have this issue can you help with correct version.

Hi All

Anyone can help me on this
I suggest opening a new topic for this problem instead of using one which is already marked as solved. Give a good detailed problem description and title and continue from there

Hi @Harm_Veenstra ,

 

In this location: "C:\Program Files\WindowsPowerShell\Modules\PSReadLine" the folder name is already with Capital Letter "L".

I have run Your recommended steps:

  • "Open an powershell.exe session in Administrator privilege.
  • Run Remove-Module PSReadLine to remove the auto-loaded PSReadLine module.
  • Run Import-Module PSReadLine (use PSReadLine with capital L).
  • Then run Update-Help -Module PSReadLine -Force"

- unfortunately I still have error:

 

PS C:\WINDOWS\system32> Remove-Module PSReadLine
PS C:\WINDOWS\system32> Import-Module PSReadLine
PS C:\WINDOWS\system32> Update-Help -Module PSReadLine -Force
Update-Help : Failed to update Help for the module(s) 'PSReadLine' with UI culture(s) {en-US} : Unable to connect to He
lp 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 -Module PSReadLine -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : UnableToConnect,Microsoft.PowerShell.Commands.UpdateHelpCommand

PS C:\WINDOWS\system32>

 

Please kindly help to sort it out.

I am in company network behind Firewalls and Proxy.

 

Should we open some specific connection, for example, this?

51.104.176.40:443 SYN_SENT

 

error.png

 

I am on Windows 11 _x64_Ent

 

Thanks!

 

The IP Address is from Microsoft, and if you see SYN_SENT then you already know that it can't be reached because of your firewall. But you are able to install it, so you do have access to psgallery.com?

@Harm_Veenstra I am getting this error:

 

PS C:\WINDOWS\system32> Install-Module PSReadLine
PackageManagement\Install-Package : Unable to find module providers (PowerShellGet).
At C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

 

error2.png

Could you try Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Confirm:$false -Force:$true ?

@Harm_Veenstra 

Your command worked fine, there was no error.

Then I found such a cool article, where it was explain, how to work around, when you a behind a proxy server:

 

You would indeed need to run:

notepad $profile

 

and copy paste this bit changing my proxy details:

[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('http://webproxy.yourCompany.com:PORT')
[system.net.webrequest]::defaultwebproxy.credentials =  System.Net.CredentialCache]::DefaultNetworkCredentials
[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true

 

After that I run

 

PS C:\WINDOWS\system32> Get-PSRepository

 

and got positive results:

positive-results.png

Later was able to run

PS C:\WINDOWS\system32> update-help

it updated many components, but not all.

 

Still unable to update this part:

error3.png

 

Ah, proxy :) Nice way to add it to the profile! And yes, not all modules have updateable help...

@Rajeshlanke Hi,

 

Article.

Look into section, where:

notepad $profile

and copy paste this bit changing your proxy details:

[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('http://webproxy.yourCompany.com:PORT')
[system.net.webrequest]::defaultwebproxy.credentials = System.Net.CredentialCache]::DefaultNetworkCredentials
[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true

 

Setup your proxy connection. Then it should work. For me it helped a lot. ;)

 

Andrej

@Harm_Veenstra 

Yes, seems so. Not all modules can be updated by update-help.

Finally I found these: Article and Article2, where I was able to update part of failing modules help.

 

>>

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

 

So the reamianing list of items to fix are module(s):

  • AzureStackHCI
  • ConfigDefender
  • ConfigDefenderPerformance
  • Get-NetView
  • Pester
  • RemoteDesktop
  • StorageBusCache
  • StorageMigrationService
  • VMDirectStorage
  • WindowsUpdate
Using the -Online parameter for a specific cmdlet, you should get the latest help in a browser. For example, Get-Help invoke-pester -Online
1 best response

Accepted Solutions
best response confirmed by kochetov_oleksii (Copper Contributor)
Solution
https://devblogs.microsoft.com/powershell/updating-help-for-the-psreadline-module-in-windows-powersh...

"The root problem in Windows PowerShell 5.1 is that the module is automatically loaded at startup using the PSReadline name (with the lowercase l). Use the following steps workaround this problem and update the help.

Close all powershell.exe processes. Then rename the PSReadline module folder name to PSReadLine.
Open an powershell.exe session in Administrator privilege.
Run Remove-Module PSReadLine to remove the auto-loaded PSReadLine module.
Run Import-Module PSReadLine (use PSReadLine with capital L).
Then run Update-Help -Module PSReadLine -Force
These steps load the module in your session using the new name, which allows Update-Help to use the correct name to find the help content."

View solution in original post