wget is not using environment variable based proxy settings wget is not using environment variable based proxy settings powershell powershell

wget is not using environment variable based proxy settings


Pretty sure your issue here is that you are not setting environment variables and getting mixed up between cmd exe's and PowerShell cmdlets. As we read from the (what I hope is) the documentation for wget concerning proxy information:

The standard way to specify proxy location, which Wget recognizes, is using the following environment variables:

  • http_proxy
  • https_proxy

Which is exactly what you tried to do here which was a successful operation (no error) but did not work as expected.

set http_proxy="ipadress:8080"

Problem is that if you run that in PowerShell set is an alias for Set-Variable. See Get-Alias set.

PS C:\Users\matt> Get-Variable http*Name                           Value                                                                                        ----                           -----                                                                                        http_proxy=ipadress:8080     

You are also having an issue with wget as that is an alias of Invoke-WebRequest. That would only be an issue if you had at least PowerShell version 3.0 which you appear to have. In your working example you are using cmdlet syntax (-Proxy ...).

In both cases (set and the non-working wget) the command was ambiguous and PowerShell had to try to match it up to something....

So what we are seeing here is about_Command_Precedence coming into play

If you do not specify a path, Windows PowerShell uses the following precedence order when it runs commands:

  1. Alias
  2. Function
  3. Cmdlet
  4. Native Windows commands

Native Windows commands is last on the list! Really though if you are in PowerShell doing this you might as well use PowerShell cmdlets to get your environment variables set (if you insist on using wget). The only thing I am not sure of is which method you should use the first here should not persist the session where the second method is permanent. Sure the first would suffice but use the second if you want to keep these set on the computer between sessions.

  1. $env:http_proxy = "ipaddress:8080"
  2. [Environment]::SetEnvironmentVariable("http_proxy", "ipaddress:8080", "Machine")

You can read more on this from TechNet. Also watch your spelling of "address"


If you are going to be using cmd utilities make sure you append .exe and if you don't specify the full path to the resource then ensure its directory is part of the path environment variable.


It was a problem with the powershell commandlets the wget what is a shortcut for Invoke-WebRequest can't work with a proxy that needs authentication. It is not the only commandlet wich is not working with proxy's. The easist way was to use the cntlm

set up the proxy and use it as proxy and it is working.