Created
June 1, 2012 16:11
-
-
Save tiernano/2853256 to your computer and use it in GitHub Desktop.
Download Windows 2012 Server RC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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