Added proxy support

This commit is contained in:
Dax T. Games 2016-04-05 09:27:53 -05:00
parent 5a1f81655f
commit 5068188059

View File

@ -99,6 +99,9 @@ function Download-File {
$File = $File -Replace "/", "\"
Write-Verbose "Downloading from $Url to $File"
$wc = new-object System.Net.WebClient
if ($env:https_proxy) {
$wc.proxy = (new-object System.Net.WebProxy($env:https_proxy))
}
$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;
$wc.DownloadFile($Url, $File)
}