Proxy, Proxy on the Wall...

…who annoys the most in the land.

Proxy servers are still a popular tool in many enterprise environments to channel outbound web traffic, scan and prevent threats. Unfortunately, very few companies use transparent proxy solutions and force you to configure the proxy server in the respective application.

Since the configuration of the proxy is different for each application, I collect some examples here.


You can do a lot of things right with a system-wide proxy. This is easily set in Windows via netsh.

netsh winhttp set proxy "" bypass-list="\*;<local>"

ARMClient / .NET applications

The ARMClient is a great way to easily use Microsoft’s REST API. As with any .NET application, to explicitly specify the proxy, you need to create a .config file. For ARMClient this is called ARMClient.exe.config

      <proxy usesystemdefault="false" autoDetect="false" proxyaddress="" bypassonlocal="true"/>
          <add address="\[a-z\]+\.local\.bader\.cloud$" />

Unfortunately, the ADAL login used does not provide any proxy support, so the current release 1.3 must be used. This supports login via the Azure CLI and thus also a proxy.


To set the setting system wide the machine.config must be adjusted.
The exact path to the file can be found with the following command.



The configuration is well documented in the doc, I extended my script a bit to automate the complete installation in PowerShell.

\# Install Chocolatey through a proxy
$env:chocolateyProxyLocation = ""
$proxy = new-object System.Net.WebProxy
$proxy.Address = $env:chocolateyProxyLocation
$wc = New-Object System.Net.WebClient
$wc.proxy = $proxy
iex ($wc.DownloadString(''))
# Set Proxy for package download
choco config set proxy $env:chocolateyProxyLocation


A proxy can also be defined in PowerShell. The configuration is loaded at every start of the $PROFILE.

$proxyString = ""
$proxyUri = new-object System.Uri($proxyString)
\[System.Net.WebRequest\]::DefaultWebProxy = new-object System.Net.WebProxy ($proxyUri, $true)

PowerShell Package Provider

In order to enjoy Install-Module on a Windows 7 system, the package provider must be installed first. If a proxy is in the way, it must be specified.

$proxy = ""
Install-PackageProvider -Name NuGet -MinimumVersion -Force -Proxy $proxy
Register-PSRepository -Default -InstallationPolicy Trusted -Proxy $proxy


Last but not least, of course, you want to store your source code in Git.

git config --global http.proxy