Azure VHD下载非常慢

时间:2014-01-28 15:07:30

标签: powershell azure

我使用以下代码从Azure云下载VHD图像。下载速度很慢,所以我想确保这是最好的方法。如果是这样,我可以做任何改进,以便更快地完成下载。

由于

$destinationVHD = "I:\AzureVHD";

$sourceVHDs | foreach-object{

 $sourceVHD = [System.Uri]$_;
 $destinationVhdPath = (Join-Path -path $destinationVHD -childpath $sourceVHD.Segments[2]);

 write-host "`n`rDownloading... ";
 write-host  $sourceVHD.Segments[2] 
 Write-Host "Saving to: " $destinationVhdPath;

 $duration = Measure-Command{
    Save-AzureVhd -Source $sourceVHD.AbsoluteUri -LocalFilePath $destinationVhdPath -NumberOfThreads 10
 }

 Write-Host "`t Save complete in: " $duration.Hours "hrs," $duration.Minutes "min," $duration "secs," $duration.TotalMilliseconds "millisecs"

}

0 个答案:

没有答案