none
PowerShell 3 update-help (proxy issues?)

    Question

  • 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


    Dr. YSG

    Thursday, December 27, 2012 6:07 PM

All replies

  • 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


    Cataleya Li
    TechNet Community Support

    Friday, December 28, 2012 6:00 AM
    Moderator
  • 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
    Friday, December 28, 2012 6:33 AM
  • 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>


    Dr. YSG


    • Edited by DrYSG Friday, December 28, 2012 3:52 PM
    Friday, December 28, 2012 3:50 PM
  • 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>


    Dr. YSG

    Friday, December 28, 2012 4:17 PM
  • 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 .


    Cataleya Li
    TechNet Community Support

    Tuesday, January 01, 2013 2:55 AM
    Moderator
  • 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.


    Dr. YSG

    Tuesday, January 01, 2013 3:32 PM
  • 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


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Thursday, January 03, 2013 7:00 AM
  • 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.


    Dr. YSG

    Thursday, January 03, 2013 5:14 PM
  • 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
    Monday, January 14, 2013 11:30 AM
  • 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> 


    Dr. YSG

    Monday, January 14, 2013 3:40 PM
  • 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.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Wednesday, February 13, 2013 7:12 AM
  • This is what worked for me

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


    Tuesday, June 11, 2013 12:20 AM
  • 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> 


    Dr. YSG

    Tuesday, June 11, 2013 2:21 PM
  • 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.
    Thursday, June 13, 2013 3:15 AM
  • Are you running  this in the ISE as admin?

    Thursday, June 13, 2013 5:17 AM
  • 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

    Friday, June 14, 2013 11:58 AM
  • 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



    Friday, June 21, 2013 5:24 PM
  • 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-benutzen


    Please click “Mark as Answer” if my post answers your question and click “Vote As Helpful” if my Post helps you.
    Bitte markiere hilfreiche Beiträge von mir als “Als Hilfreich bewerten” und Beiträge die deine Frage ganz oder teilweise beantwortet haben als “Als Antwort markieren”.
    My PowerShell Blog http://www.admin-source.info
    [string](0..21|%{[char][int]([int]("{0:d}" -f 0x28)+('755964655967-86965747271757624-8796158066061').substring(($_*2),2))})-replace' '
    German ? Come to German PowerShell Forum!

    • Edited by Peter Kriegel Monday, June 24, 2013 6:18 AM fdfdsfdsdfs
    Monday, June 24, 2013 6:17 AM
  • Thank You fhofmann... Your solution worked for me ! it was awesome

    Pavan

    Tuesday, July 09, 2013 2:14 PM
  • 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!

    Tuesday, October 29, 2013 1:43 PM
  • 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


    Dr. YSG

    Wednesday, October 30, 2013 2:29 PM
  • 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

    Thursday, November 14, 2013 8:41 PM
  • IE ESC seems to be a feature in win2008 server. I have a win7 box, and it is not an installed component.


    Dr. YSG

    Friday, November 15, 2013 2:23 PM
  • 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


    JR

    Wednesday, August 27, 2014 6:45 AM
  • 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


    Dr. YSG


    • Edited by DrYSG Wednesday, August 27, 2014 3:53 PM
    Wednesday, August 27, 2014 3:52 PM
  • 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


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Wednesday, August 27, 2014 4:03 PM
    Moderator
  • Give me a day or two to test this out. I have been out of the office for quite a while.


    Dr. YSG

    Monday, October 20, 2014 2:27 PM
  • 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


    Dr. YSG

    Monday, October 20, 2014 4:02 PM
  • Well done, fhofmann!
    Wednesday, March 25, 2015 3:11 PM
  • Man, this is really nuts!

    I looked through the other posts and was already thinking they're all the same meaningless and irrelevant to my problym, but when I saw what you were doing and thought it through...then gave it a try...and it worked out!!!

    This is rediculous how can a seemingly standalone WebClient's object proxy solve the Proxy problem of some code nested deep inside a third-party assembly, but it does!

    Thanks a lot for pointing this out! I've spent a fed days (not from start to the end, but still) trying to find keys for this problem and with your help I finally did!

    Friday, November 06, 2015 4:17 PM