title: Powershell Web with Proxy
body: <p>I am getting a proxy error with my script. "The remote server returned an error: (407) Proxy Authentication Required."</p>
  
  <p>IE uses a script to configure it's connection (that's all the info I have).  I looked in there and tried some IPs/ports in my script, but none seemed to work. Is there some other way of using this IE connection script in PS?  </p>
  
  <pre><code>$web_client = New-Object System.Net.WebClient;
  $web_client.Headers.Add("user-agent", "PowerWeb");
  
  $proxyAddr =  "http://172.16.192.34:9090" 
  $proxy = new-object System.Net.WebProxy
  $proxy.useDefaultCredentials = $true
  
  $proxy.Address = $proxyAddr
  
  $web_client.proxy = $proxy
  
  $data = $web_client.DownloadData("http://stackoverflow.com")
  </code></pre>