How to find which azure backup protection policy applied on specific Azure virtual machine via Powershell
Get- AzureRmRecoveryServicesBackupProtectionPolicy asking for policyname but there are many policy under one service vault.
thanks!
How to find which azure backup protection policy applied on specific Azure virtual machine via Powershell
Get- AzureRmRecoveryServicesBackupProtectionPolicy asking for policyname but there are many policy under one service vault.
thanks!
You could use following script.
##Replace Recovery service vault name
Get-AzureRmRecoveryServicesVault -Name "shui" | Set-AzureRmRecoveryServicesVaultContext
##FriendlyName is your Azure VM name
$namedContainer=Get-AzureRmRecoveryServicesBackupContainer -ContainerType "AzureVM" -Status "Registered" -FriendlyName "shui"
$item = Get-AzureRmRecoveryServicesBackupItem -Container $namedContainer -WorkloadType "AzureVM"
$item.ProtectionPolicyName