Powershell gallery in a proxy environment

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

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

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

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.