public static void SetDefaultStorage()
 {
     if (!string.IsNullOrEmpty(GetDefaultStorage(CredentialHelper.DefaultStorageName, CredentialHelper.Location)))
     {
         vmPowershellCmdlets.SelectAzureSubscription(defaultAzureSubscription.SubscriptionId);
         defaultAzureSubscription = vmPowershellCmdlets.SetAzureSubscription(defaultAzureSubscription.SubscriptionId, CredentialHelper.DefaultStorageName);
         defaultAzureSubscription.CurrentStorageAccountName = CredentialHelper.DefaultStorageName;
         storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(CredentialHelper.DefaultStorageName);
         Assert.AreEqual(CredentialHelper.DefaultStorageName, storageAccountKey.StorageAccountName);
         blobUrlRoot = (vmPowershellCmdlets.GetAzureStorageAccount(CredentialHelper.DefaultStorageName)[0].Endpoints.ToArray())[0];
     }
     else
     {
         Console.WriteLine("Unable to get the default storage account");
     }
 }
        protected static void DownloadVhds()
        {
            storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName);

            foreach (var vhdFile in VhdFiles)
            {
                string vhdBlobLocation = string.Format("{0}{1}/{2}", blobUrlRoot, VhdFilesContainerName, vhdFile);

                var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdFile);

                if (!File.Exists(vhdLocalPath.FullName))
                {
                    // Set the source blob
                    BlobHandle blobHandle = Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary);

                    SaveVhd(blobHandle, vhdLocalPath, storageAccountKey.Primary);
                }
            }
        }