add default proxy support to dnvminstall.ps1

Retrieve the default proxy settings from the system and also set the proxy credentials from the system too
This commit is contained in:
Fabien Dehopré 2015-08-24 11:55:57 +02:00
parent b1a1f52331
commit bab8777bd9
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ if (!(Test-Path $tempPath)) { md $tempPath | Out-Null }
$webClient = New-Object System.Net.WebClient
$webClient.Proxy = [System.Net.WebRequest]::DefaultWebProxy
$webClient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
Write-Host "Downloading DNVM.ps1 to $dnvmPs1Path"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.ps1', $dnvmPs1Path)
Write-Host "Downloading DNVM.cmd to $dnvmCmdPath"