question

santoshllc-9062 avatar image
0 Votes"
santoshllc-9062 asked LeonLaude answered

Azure VM snapshot using powershell

I would like to automate the creating VM's snapshots and deleting snapshots for multiple VM's on one go. is it possible to achieve this using PowerShell or azure cli?

azure-backup
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LeonLaude avatar image
0 Votes"
LeonLaude answered

Hi @santoshllc-9062,

Yes this is doable for example with Azure PowerShell or Azure CLI, please refer to the official documentations below for achieving this with Azure PowerShell:

Back up Azure VMs
https://docs.microsoft.com/en-us/azure/backup/backup-azure-vms-automation#back-up-azure-vms

Soft delete for Azure Backup - Permanently deleting soft deleted backup items
https://docs.microsoft.com/en-us/azure/backup/backup-azure-security-feature-cloud#using-azure-powershell

Here's also a great blog post on automating Azure VM backups with Azure PowerShell:
Automate Backup For Azure VMs using PowerShell for Azure Backup


If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!


Best regards,
Leon

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.