Friday, September 25, 2015

Powershell command to Uploading VHD to Azure:


Open the Azure Powershell cmdlets and make sure that your default Azure Subscription and Storage accounts  are configured as the accounts in which to deploy your VM. 
  •  Get-AzurePublishSettingFile- Download Publish settings files to disk using browser
  • Import-AzureSettingsFile "<path to file>\<filename>.publishSettings" - Import the publish settings to Windows PowerShell context
  • Set-AzureSubscription "<Subscription Name>" - CurrentStorageAccountName "<StorageAccountName>" - Set default Subscription and Storage Accounts
Instead of Downloading, Storing and Securing publish Settings files, You can also use Azure Active Directory to Authenticate.  Instead of step 1 and 2 above, run  Add-AzureAccount and then set default Subscription and Storage accounts:
  
Set-AzureSubscription "<Subscription Name>" - CurrentStorageAccountName "<StorageAccountName>"

TO upload each VHD to a blob Container: 

    Add-AzureVHD -Destination http://<StorageAccountName>.blob.core.windows.net/<ContainerName>/DestinationFileName>.vhd 
                 -LocalFilePath C:\<PathToSourceImage>\<SourceFileName>.vhd



Starting with Azure

Having been into .net development since past 8 years, I felt this is the right time to make a jump to the world of NextGen: Cloud Computing and whats best than Azure cloud Computing !!

Wishing all the very best to every one joining me in this venture !!