Skip to content

Instantly share code, notes, and snippets.

@tiernano
Created June 1, 2012 16:11
Show Gist options
  • Save tiernano/2853256 to your computer and use it in GitHub Desktop.
Save tiernano/2853256 to your computer and use it in GitHub Desktop.
Download Windows 2012 Server RC
Import-Module bitstransfer
$url = "http://url.ie/fdvf"
$job = Start-BitsTransfer -source $url -Destination c:\downloads -Asynchronous
while (($job.JobState -eq 'Transferring') -or ($job.JobState -eq 'Connecting')){
write-progress -Activity "Downloading" -status "percent complete" -PercentComplete (($job.bytesTransferred / $job.BytesTotal) * 100)
sleep 1
}
if($job.JobState -eq 'Transferred')
{
Complete-BitsTransfer $job
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment