Share via

Powershell Script to take backup of Azure VM with cross subscription

37821879 90 Reputation points
Feb 14, 2024, 5:02 AM

Need Powershell Script to take backup of Azure VM with cross subscription

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,307 questions
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 37,871 Reputation points Microsoft Employee
    Feb 14, 2024, 7:41 PM

    @37821879
    I understand that you want to backup an Azure VM to another subscription using PowerShell. Its not currently possible to backup a VM directly to another subscription. Please check to see if one of these options work for you.

    Currently Azure Backup allows for Cross Subscription Restore for Azure VM but not direct backup to another subscription. For successful backup, virtual machines must be in the same subscription as the vault for backup. Cross Subscription restore is enabled by default. For the PowerShell instructions on restoring a VM you can refer to the examples here.

    Another option is to create an Image of the Virtual Machine in Azure Compute Gallery and share that to the other subscription. If you want the image to be copied to an Azure Compute Gallery in the other subscription you can follow the steps outlined in this blog post.

    Hopefully one of these scenarios work for you. If you still have questions or need more assistance please let me know!


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts. If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community. Thank you for helping to improve Microsoft Q&A! User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.