Azure VM Managed Disks backup to Azure Blob Storage

I’ve recently had a requirement to backup managed disks to Azure blob storage. Rather performing this manually, I scripted this with PowerShell. I created a structure within a .CSV file as an input file, which specifies the Virtual machine names and the storage container and folder, where the disks will be copied into. The script and a sample input file is in my repository below.

Copy Azure Virtual Machine Managed Disks to Azure Blob Storage PowerShell Script

Sample Input .CSV File

You will need to update the following variables in the PowerShell script and create your own input file.

$VMNames = Import-Csv -LiteralPath “FULL-PATH-TO-CSV-FILE”
$TargetStorageAccountName = “YOUR-STORAGE-ACCOUNT-NAME”
$TargetStorageAccountKey = “YOUR-STORAGE-ACCOUNT-KEY”