Skip to content

Instantly share code, notes, and snippets.

@warnergodfrey
Last active August 29, 2015 14:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warnergodfrey/17f077e250a37e5045e0 to your computer and use it in GitHub Desktop.
Save warnergodfrey/17f077e250a37e5045e0 to your computer and use it in GitHub Desktop.
Installing Chocolatey from behind a proxy

Installing Chocolatey

Direct Internet connection

If you are fortunate enough have a direct Internet connection, or sit behind a transparent proxy, simply follow the default installation instructions.

Via a HTTP proxy server

If your target machine is behind a proxy, and your Windows networking is configured with the proxy settings, the installation method is slightly different...

Powershell

Set-ExecutionPolicy Unrestricted
$wc=new-object net.webclient; $wp=[system.net.WebProxy]::GetDefaultProxy(); $wp.UseDefaultCredentials=$true; $wc.Proxy=$wp; iex ($wc.DownloadString('https://chocolatey.org/install.ps1'))

Command Line

@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')) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment