Here is a AzureRM version of script to download the VHD. NOTE: before downloading the VHD make sure that it is not in use e.g. parent VM is switched off
Script to Download VM from Azure
#Login-AzureRmAccount Select-AzureRMSubscription -TenantId <> -SubscriptionId <> $sourceVHD = <> $destinationVHD = <> Save-AzureRmVhd -ResourceGroupName <> -SourceUri $sourceVHD -LocalFilePath $destinationVHD