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?
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:
Soft delete for Azure Backup - Permanently deleting soft deleted backup items
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
accept as answer, thank you!
7 people are following this question.