Skip to content

Instantly share code, notes, and snippets.

@chrissie1
Created July 25, 2011 13:11
Show Gist options
  • Save chrissie1/1104085 to your computer and use it in GitHub Desktop.
Save chrissie1/1104085 to your computer and use it in GitHub Desktop.
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment