Powershell gallery in a proxy environment

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Cognic Cognic 7 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34820
    Profile photo of Cognic
    Cognic
    Participant

    Hi,

    Has anyone managed to get the internet access from Powershell v5 for the Powershell gallery to work, typically with nuget based repositories? If yes, please share how you did.

    Thanks

    #34823
    Profile photo of Cognic
    Cognic
    Participant

    This is what I see:

    "WARNING: Unable to download the list of available providers. Check your internet connection."

    Internet access is there from the machine when browsed from Internet explorer

    #34826
    Profile photo of Wilfredo Perez
    Wilfredo Perez
    Participant

    Can you update help? You may have to authenticate first from within Powershell. I am behind a proxy so I need to use:

    $webclient = New-Object System.Net.WebClient
    $creds = Get-Credential
    $webclient.Proxy.Credentials = $creds
    Save-Help -DestinationPath C:\Powershell
    
    Update-Help
    

    Do you have admin rights? Hope this helps

    #34832
    Profile photo of Cognic
    Cognic
    Participant

    Thanks Wilfredo for your reply. Apologies that I haven't mentioned the ways I have already tried.

    I have tried setting the proxy through the PowerShell in the following ways:

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

    Also, using the scripted credentials:
    $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

    But both didn't work.

    I can't update help and I do have admin rights.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.