Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set proxy from command line Windows 7

I need to set a proxy using command line in windows .

Have you any idea about the commands to execute ?

Thank you in advance .

like image 626
mndhr Avatar asked Jul 16 '26 13:07

mndhr


1 Answers

For me neither the above in the previous answer neither what suggested here(that is quite the same, only explained a bit better).

What instead has worked so far, and only for the session, is this command:

(New-Object System.Net.WebClient).Proxy.Credentials =  
[System.Net.CredentialCache]::DefaultNetworkCredentials

as from really well explained here

Then I was able to retrieve web content as for example:

Invoke-WebRequest http://example.org
like image 63
Carmine Tambascia Avatar answered Jul 20 '26 11:07

Carmine Tambascia