Created
September 13, 2012 19:35
-
-
Save erichexter/3717010 to your computer and use it in GitHub Desktop.
install chocolatey with windows auth proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy -ExecutionPolicy Unrestricted;$a=new-object net.webclient;$a.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials;$a.downloadstring('http://bit.ly/OKgXHP')|iex |
Excellent! Works fine for me inside a proxy.
This worked for me:
@PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "$wc=new-object net.webclient; $wp=[system.net.WebProxy]::GetDefaultProxy(); $wp.UseDefaultCredentials=$true; $wc.Proxy=$wp; iex ($wc.DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
what if i need not default system proxy?
Perfectly!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And this works on a non-proxied network as well correct?