Posts

Showing posts from January, 2016

Using Azure PowerShell with Web Proxy

Add Proxy URI to Script Add the code below to the top of your Azure PowerShell script to define a proxy URI that your script can use for communicating with Microsoft Azure.  Depending on your proxy scenario, the value you use for the $proxyString variable may be different in your environment.  In the example below, I’m specifying the proxy URI value that’s commonly used with Fiddler. $proxyString = "http://127.0.0.1:8888" $proxyUri = new-object System.Uri($proxyString) [System.Net.WebRequest]::DefaultWebProxy =     new-object System.Net.WebProxy ($proxyUri, $true) Add Proxy Credentials to Script If the proxy configuration used in your environment requires authentication, you can also add one of the following lines to your script – depending on the type of authentication credentials required. To use Windows credentials for proxy authentication, you can add … [System.Net.WebRequest]::DefaultWebProxy.Credentials =     [System.Net.Cred...