Forum Discussion

jagadish .D's avatar
jagadish .D
Copper Contributor
Jan 21, 2020

Collect and consolidating VM name from Azure Site Recovery Plans

 

I would like to develop a PowerShell script to collect VM names from each recovery plan and consolidate, which are all added into Azure Site Recovery Plan. I tried available commands(Get-AzRecoveryServicesAsrFabric, Get-AzRecoveryServicesAsrProtectableItem, Get-AzRecoveryServicesAsrProtectionContainer, Get-AzRecoveryServicesAsrRecoveryPlan, Get-AzRecoveryServicesAsrReplicationProtectedItem, Get-AzRecoveryServicesAsrServicesProvider) in Azure Az module which are all related one each another to get details. But I am not able to get correct details, and as it seems not straight forward method like Get-AzVM like.

 

Could you please any one share the step by step procedure or suggestion to get the Protected VM’s in each Recovery plan and consolidate?

 

I have attached sample screenshot. ASR-Plan1 & ASR-Plan1 are recovery plan names and inside you can able to see VM names which are all protected(enabled).

 

Appreciating in advance who are all helping on this.

Thanks.

Jax

No RepliesBe the first to reply