PowerShell 3 update-help (proxy issues?)

I am running the PowerShell 3.0, as an admin, but update-help is not working. I suspect it does not know that we have an outbound proxy that requires: port, host, username, password. However WinHTTP API apps should grab this from the default credentials. I expected PS to do this.

PS C:\Windows\system32> update-help
update-help : Failed to update Help for the module(s) 'ISE, Microsoft.PowerShell.Management, Microsoft.PowerShell.Utility, CimCmdlets, Microsoft.PowerShell.Diagnostics,
Microsoft.PowerShell.Host, Microsoft.PowerShell.Security, Microsoft.WSMan.Management, PSScheduledJob, PSWorkflow, PSWorkflowUtility, Microsoft.PowerShell.Core' with UI
culture(s) {en-US} : Unable to connect to Help content. Make sure the server is available and then try the command again.
At line:1 char:1
+ update-help
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : UnableToConnect,Microsoft.PowerShell.Commands.UpdateHelpCommand

December 27th, 2012 6:07pm

Hi,

Please run powershell as admin and run this command:

Update-help -sourcepath <<location of extracted package\HelpContent>>

Adding one of supported -UICulture (e.g. en-US) may also help.

In addition, please also refer to the below links:

Failed to update Help for the module(s) 'Microsoft.WSMan.Management'

http://connect.microsoft.com/PowerShell/feedback/details/729539/failed-to-update-help-for-the-module-s-microsoft-wsman-management

Where is PowerShell Updatable Help for Windows Modules

http://blogs.technet.com/b/heyscriptingguy/archive/2012/09/24/where-is-powershell-updatable-help-for-windows-modules.aspx

Regards,

Yan Li

Free Windows Admin Tool Kit Click here and download it now
December 28th, 2012 6:00am

Try to configure winhttp proxy:

netsh winhttp import proxy source=ie

or

NetSH WinHTTP Set Proxy proxy-server="ProxyServer:8080"

  • Proposed as answer by Ivanac Wednesday, September 18, 2013 2:13 PM
December 28th, 2012 6:33am

Try to configure winhttp proxy:

netsh winhttp import proxy source=ie

or

NetSH WinHTTP Set Proxy proxy-server="ProxyServer:8080"

  • Proposed as answer by Ivanac Wednesday, September 18, 2013 2:13 PM
Free Windows Admin Tool Kit Click here and download it now
December 28th, 2012 6:33am

It Cataleya, I saw that article, but update-help is complaining about the connection, not the path, or access to the directory.

Kazun, this does sound right. But oddly it did not work: (ran this as admin in Powershell v3): (here are my proxy settings in IE. As you can see, proxy settings are coming from a script. But I do know the exact values also.

As for suggestion #2. Yes, seems that I have to go that way. But how do I also add username and password? Clearly not like this:

NetSH WinHTTP Set Proxy proxy-server="ProxyServer:8080<username><password>"

(the powershell script below ran fine. But it did not import anything from IE).

PS C:\Windows\system32> netsh winhttp show proxy

Current WinHTTP proxy settings:

    Direct access (no proxy server).


PS C:\Windows\system32> Netsh winhttp import proxy source=ie

Current WinHTTP proxy settings:

    Direct access (no proxy server).


PS C:\Windows\system32> netsh winhttp show proxy

Current WinHTTP proxy settings:

    Direct access (no proxy server).


PS C:\Windows\system32>

December 28th, 2012 3:50pm

Just to follow up, here is what happens if I don't add credentials:

PS C:\Windows\system32> NetSH WinHTTP Set Proxy proxy-server="gw6.draper.com:3128"

Current WinHTTP proxy settings:

    Proxy Server(s) :  gw6.draper.com:3128
    Bypass List     :  (none)


PS C:\Windows\system32> update-help
update-help : Failed to update Help for the module(s) 'ISE, Microsoft.PowerShell.Management, Microsoft.PowerShell.Utility, CimCmdlets, Microsoft.PowerShell.Diagnostics,
Microsoft.PowerShell.Host, Microsoft.PowerShell.Security, Microsoft.WSMan.Management, PSScheduledJob, PSWorkflow, PSWorkflowUtility, Microsoft.PowerShell.Core' with UI
culture(s) {en-US} : Unable to connect to Help content. Make sure the server is available and then try the command again.
At line:1 char:1
+ update-help
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : UnableToConnect,Microsoft.PowerShell.Commands.UpdateHelpCommand
 

PS C:\Windows\system32>

Free Windows Admin Tool Kit Click here and download it now
December 28th, 2012 4:17pm

Hi,

Based on my understanding and according to the error message, Unable to connect to Help content. Make sure the server is available and then try the command again, and we should first make sure that the server could access the internet for online update.

How about run:

update-help -online.

And please also turn off firewall and try it again.

Regards,

Yan Li

If you have any feedback on our support, please click here .

January 1st, 2013 2:55am

I don't think you really mean the first:

  • PS C:\Windows\system32> update-help -online
    Update-Help : A parameter cannot be found that matches parameter name 'online'.
    At line:1 char:13
    + update-help -online
    +             ~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Update-Help], ParameterBindingException
        + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.UpdateHelpCommand

But PS>get-help <whatever> -online

works fine.

I am completely forbidden to remove the firewall. It is not in my control. I work at company with 4,000 desktop systems, and the firewall is controlled by IT. Without the proxy I cannot get out to the internet (this is very common in industry these days, and especially if you work on government contracts).

However, I have no doubt that if I worked at a machine without the firewall update-help would work.

Free Windows Admin Tool Kit Click here and download it now
January 1st, 2013 3:32pm

Hi YSG,

I suggest that you can try that on some other machines. If it is successful on other machines, you can save the help using Save-Help. Then transfer that help folder to your non-working machine, and do and Update-Help -Source xyz.

Please refer to the following thread:

http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/e4380794-2404-48cc-ad3a-be351274dbfd

Best Regards

Scott Xie

January 3rd, 2013 7:00am

I did see that thread. But it does not help me. All 1,000+ people (and maybe 10,000 computers) at our company are behind the firewall. So they all have this issue. No option to save-help.

The reason I bring it up is that I am not surprised when 3rd party software cannot read the proxy credential info out of InternetExplorer and automatically detect and setup the proxy info. (but I have many programs that do this correctly, and they are not from Microsoft).

But I would expect Microsoft to do this. Can you submit it as a bug to have the powershell folks work on it? It really makes Microsoft look less professional than it is.

Free Windows Admin Tool Kit Click here and download it now
January 3rd, 2013 5:14pm

Hi,

you can define a proxy which can be used by Powershell.

Just try:

$webclient = New-Object System.Net.WebClient
$creds = Get-Credential
$webclient.Proxy.Credentials = $creds

And then try Update-Help. If it works like expected, you could also work with scripted credentials (replace "username" and "password").

$webclient = New-Object System.Net.WebClient
$pwd = ConvertTo-SecureString "password" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential("username",$pwd)
$webclient.Proxy.Credentials = $creds

Bye

Frank

  • Proposed as answer by Sean Surles Monday, August 05, 2013 1:19 PM
January 14th, 2013 11:30am

Hi,

you can define a proxy which can be used by Powershell.

Just try:

$webclient = New-Object System.Net.WebClient
$creds = Get-Credential
$webclient.Proxy.Credentials = $creds

And then try Update-Help. If it works like expected, you could also work with scripted credentials (replace "username" and "password").

$webclient = New-Object System.Net.WebClient
$pwd = ConvertTo-SecureString "password" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential("username",$pwd)
$webclient.Proxy.Credentials = $creds

Bye

Frank

  • Proposed as answer by Sean Surles Monday, August 05, 2013 1:19 PM
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2013 11:30am

Hey, that is really nice. And it also make sense. I am no longer getting the cannot connect message. I now get this: (running as admin)

PS C:\Windows\system32> $webclient = New-Object System.Net.WebClient
$creds = Get-Credential
$webclient.Proxy.Credentials = $creds
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:

PS C:\Windows\system32> update-help
update-help : Failed to update Help for the module(s) 'ISE, Microsoft.PowerShell.Management, Microsoft.PowerShell.Security, Microsoft.PowerShell.Utility, CimCmdlets, 
Microsoft.PowerShell.Diagnostics, Microsoft.PowerShell.Host, Microsoft.WSMan.Management, PSScheduledJob, PSWorkflow, PSWorkflowUtility, Microsoft.PowerShell.Core' 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 'http://go.microsoft.com/fwlink/?LinkID=238789' does not resolve to a container.
At line:1 char:1
+ update-help
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : InvalidHelpInfoUri,Microsoft.PowerShell.Commands.UpdateHelpCommand
 

PS C:\Windows\system32> 

January 14th, 2013 3:40pm

Hi,

To further troubleshoot the issue, a lot of logs need to be captured and analyzed. I suggest you can create a support case to Microsoft for the issue.

Free Windows Admin Tool Kit Click here and download it now
February 13th, 2013 7:12am

This is what worked for me

$webclient = New-Object System.Net.WebClient
$creds = Get-Credential
$webclient.Proxy.Credentials = $creds
update-help


  • Proposed as answer by Wednesday, October 15, 2014 5:42 AM
June 11th, 2013 12:20am

This is what worked for me

$webclient = New-Object System.Net.WebClient
$creds = Get-Credential
$webclient.Proxy.Credentials = $creds
update-help


  • Proposed as answer by Wednesday, October 15, 2014 5:42 AM
Free Windows Admin Tool Kit Click here and download it now
June 11th, 2013 12:20am

Sounded very good to me. But I am still having problems.

PS C:\Windows\system32> $webclient = New-Object System.Net.WebClient
$creds = Get-Credential
$webclient.Proxy.Credentials = $creds
update-help

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
update-help : Failed to update Help for the module(s) 'ISE, Microsoft.PowerShell.Management, Microsoft.PowerShell.Security, Microsoft.PowerShell.Utility, CimCmdlets, Microsoft.PowerShell.Diagnostics, Microsoft.PowerShell.Host, 
Microsoft.WSMan.Management, PSScheduledJob, PSWorkflow, PSWorkflowUtility, Microsoft.PowerShell.Core' 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 'http://go.microsoft.com/fwlink/?LinkID=238789' does not resolve to a container.
At line:4 char:1
+ update-help
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : InvalidHelpInfoUri,Microsoft.PowerShell.Commands.UpdateHelpCommand
 

PS C:\Windows\system32> 

June 11th, 2013 2:21pm

Hi, I can see why you're trying to introduce a proxy setting into the picture BUT how does update-help become aware of it ? I started out assuming that update-help would use the default proxy settings for the user logged on but that does not seem to be the case. INVOKE-WEBREQUEST is obviously capable of dealing with proxies so why doesn't UPDATE-HELP?? A question for MS I think.
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 3:15am

Are you running  this in the ISE as admin?

June 13th, 2013 5:17am

Ok, we have a similar situation here at my job. I get exactly the same result.

Background:

In order to get out through our proxy one has to provide credentials. As a normal user this is done automagically by update-help, however...

My ordinary user account is not allowed to write the files that update-help downloads.

OTH, my admin account is allowed to write the files but is not allowed out through the proxy.

So I'm in  catch 22 situation here.

/Daniel

Free Windows Admin Tool Kit Click here and download it now
June 14th, 2013 11:58am

You have no idea what you are talking about.  Save-Help does not understand proxies.  Most enterprises have proxies.  Let me make  it perfectly clear:

Save-Help in Powershell 3 is COMPLETELY USELESS IN AN ENTERPRISE ENVIRONMENT  

IT DOES NOT WORK



June 21st, 2013 5:24pm

PowerShell MVP Ravikanth Chaganti has written a Blog Post about this issue:
PowerShell 3.0: Save-Help woes and solution
http://www.ravichaganti.com/blog/?p=2501

The Proxy authentication does not worked for our Proxy. So I have Improved the work from Ravikanth Chaganti.

This is a German Article. You can use the Translate Button on my Blog, to Translate it with Google Translate!
Use Save-Help for offline Computers in the Enterprise behind a Proxy:

http://www.admin-source.de/BlogDeu/548/save-help-im-unternehmen-fuer-offline-rechner-auch-mit-einem-proxy-benutz

June 24th, 2013 6:17am

Thank You fhofmann... Your solution worked for me ! it was awesome
July 9th, 2013 2:14pm

fhofman's solution worked for me, too. Able to finally update help even though my company is behind a proxy. I ran the first three lines of code, then was prompted for my network credentials. Entered those, then went back to PowerShell window and ran Update-Help.. Worked. Awesome!

Free Windows Admin Tool Kit Click here and download it now
October 29th, 2013 1:43pm

Fhoffman's solution, is not working for me.

And I cannot follow the german (translated to english) (although I do speak some German) in Peter Kriegel's post.

PS C:\Windows\system32> $webclient = New-Object System.Net.WebClient
$creds = Get-Credential
$webclient.Proxy.Credentials = $creds
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:

PS C:\Windows\system32> update-help
update-help : Failed to update Help for the module(s) 'ISE, Microsoft.PowerShell.Management, Microsoft.PowerShell.Security, Microsoft.PowerShell.Utility, CimCmdlets, Microsoft.PowerShell.Diagnostics, Microsoft.PowerShell.Host, Microsoft.WSMan.Management, 
PSScheduledJob, PSWorkflow, PSWorkflowUtility, Microsoft.PowerShell.Core' with UI culture(s) {en-US} : Unable to connect to Help content. Make sure the server is available and then try the command again.
At line:1 char:1
+ update-help
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : UnableToConnect,Microsoft.PowerShell.Commands.UpdateHelpCommand
 

PS C:\Windows\system32> $creds

UserName                                                                                                                                                                                                                                                 Password
--------                                                                                                                                                                                                                                                 --------
ysg4206`                                                                                                                                                                                                                             System.Security.SecureString

October 30th, 2013 2:29pm

Try to turn off IE ESC (Internet Explorer Enhanced Security Configuration). That worked for me. After update-help is finished you can turn it back on if required.

Victor

Free Windows Admin Tool Kit Click here and download it now
November 14th, 2013 8:41pm

IE ESC seems to be a feature in win2008 server. I have a win7 box, and it is not an installed component.

November 15th, 2013 2:23pm

Hi Dr YSG,

I have successfully used the following script to full automaticalyl update all of our Servers (>2008) with the powershell help (although some Computers did not update but the Job was running forever, most did):


$AllRelevantservers = Get-ADComputer -filter * -Properties OperatingSystem | select name, operatingsystem | where operatingsystem -like *Server* | where operatingSystem -notlike *2003* | where operatingsystem -notlike *2000*
$Jobs = @()
foreach ($Computer in $AllRelevantservers)
{
 write-host "Processing server '"$Computer.name"'..."
 $Job = Invoke-Command -asjob -ComputerName $Computer.name -ScriptBlock{
  $wc = New-Object System.Net.WebClient
  $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
  Update-Help
 }
 
 $Jobs += $Job

}

Run this within PowerGI Script Editor (download free PowerGui --> www.powergui.org) and then just enter $Jobs to see which Computers where updated successfully and which not. Give it at least 5 minutes to process.

With Kind regards,

John Ranger

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2014 6:45am

I only need it for the current computer, 

I am running as admin in win7, with PowerShell ISE:

Here is the error I get with your script:

Get-ADComputer : The term 'Get-ADComputer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.
At line:1 char:23
+ $AllRelevantservers = Get-ADComputer -filter * -Properties OperatingSystem | sel ...
+                       ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-ADComputer:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
August 27th, 2014 3:52pm

Get-ADComputer requires the AD module, which you can install as part of the RSAT tools.

http://www.microsoft.com/en-us/download/details.aspx?id=7887

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2014 4:03pm

Give me a day or two to test this out. I have been out of the office for quite a while.

October 20th, 2014 2:27pm

Ok, I did that and installed it, no problems with install. Then I rebooted and ran the script. I am still getting the same error.

Do you have a "dumber" version of the script, that only updates the current machine. I only manage one single machine, my own, so I really don't need the RSAT tools.

Get-ADComputer : The term 'Get-ADComputer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.
At line:1 char:23
+ $AllRelevantservers = Get-ADComputer -filter * -Properties OperatingSystem | sel ...
+                       ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-ADComputer:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Free Windows Admin Tool Kit Click here and download it now
October 20th, 2014 4:02pm

Well done, fhofmann!
March 25th, 2015 11:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics