Azure Site Recovery Get List of Protected VM's Using PowerShell

rr-4098 1,321 Reputation points
2023-08-01T20:09:40.3+00:00

I am trying to get a list of all protected VM's in ASR. When I try to run any of the Get commands listed in the article below, it asks for a Protection Container which I do not see in the portal. Thoughts?

https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-powershell

Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
681 questions
{count} votes

Accepted answer
  1. SadiqhAhmed-MSFT 41,716 Reputation points Microsoft Employee
    2023-08-04T14:40:53.5366667+00:00

    @rr-4098 Please follow this article - https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-powershell 

    $PrimaryProtContainer = Get-AzRecoveryServicesAsrProtectionContainer -Fabric $PrimaryFabric -Name "A2AEastUSProtectionContainer"

    $PrimaryFabric = Get-AzRecoveryServicesAsrFabric -Name "A2Ademo-EastUS"

    Let us know how it goes!


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

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful