Skip to content

Instantly share code, notes, and snippets.

@erichexter
Created September 13, 2012 19:35
Show Gist options
  • Save erichexter/3717010 to your computer and use it in GitHub Desktop.
Save erichexter/3717010 to your computer and use it in GitHub Desktop.
install chocolatey with windows auth proxy
Set-ExecutionPolicy -ExecutionPolicy Unrestricted;$a=new-object net.webclient;$a.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials;$a.downloadstring('http://bit.ly/OKgXHP')|iex
@DanAtkinson
Copy link

Excellent! Works fine for me inside a proxy.

@dazzag24
Copy link

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

@kitt-vl
Copy link

kitt-vl commented Aug 25, 2014

what if i need not default system proxy?

@MMrR0b0TT
Copy link

Perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment