Skip to content

Instantly share code, notes, and snippets.

# download the package
Write-Host "Downloading $url to $file"
$cred = get-credential
$proxy = New-Object System.Net.WebProxy("proxyserver")
$proxy.credentials = $cred.GetNetworkCredential();
$downloader = new-object System.Net.WebClient
$downloader.proxy = $proxy
$downloader.DownloadFile($url, $file)