Swap restored os and data disk via powershell

Siva 646 Reputation points
2022-08-18T17:30:07.567+00:00

Hi Team,

Can you please guide us, pot restore of azure vm disks in rsv, how we can get the os and data disk name for swapping the disk via pwershell script.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,490 questions
0 comments No comments
{count} votes

Accepted answer
  1. SadiqhAhmed-MSFT 49,326 Reputation points Microsoft Employee Moderator
    2022-08-19T14:36:41.53+00:00

    @Siva Thank you for contacting us. Happy to answer your question!

    You Have an interesting ask about getting the OS and data disk name for swapping the disk via PowerShell script.
    Today the PS output of get job details command doesn’t include the details of the individual disks which were restored. We will take a note of this ask.

    However, today it is possible to directly restore the disks of the original or newly created VM using PowerShell (without needing to do multiple steps to first restore disk and then attach them to VM, as was the case earlier). Back up and recover Azure VMs with PowerShell - Azure Backup | Microsoft Learn

    Hope this helps!

    ----------------------------------------------------------------------------------------------------------------------

    If the response helped, do "Accept Answer" and up-vote it


1 additional answer

Sort by: Most helpful
  1. Siva 646 Reputation points
    2022-09-14T16:23:19.443+00:00

    Hi SadiqhAhmed,

    This tag is very useful and it is having the job id as value. using this , we can able to get the required restored disk name.


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.