Simplement un exemple d'utilisation du module Az.RecoveryServices pour gérer l'environnement Azure Site Recovery Services
# Get-Command -Module Az.RecoveryServices
$Vault = Get-AzRecoveryServicesVault # ajouter les paramètres pour précisier la "vault"
Set-AzRecoveryServicesAsrVaultContext -Vault $vault
$Fabric = Get-AzRecoveryServicesAsrFabric
$Container = Get-AzRecoveryServicesAsrProtectionContainer -Fabric $Fabric
Get-AzRecoveryServicesAsrReplicationProtectedItem -Protectioncontainer $Container |`
Format-Table FriendlyName,ProtectionState,ReplicationHealth,@{Label="Message";Expression={$_.ReplicationHealthErrors.ErrorMessage}}
$Vault = Get-AzRecoveryServicesVault # ajouter les paramètres pour précisier la "vault"
Set-AzRecoveryServicesAsrVaultContext -Vault $vault
$Fabric = Get-AzRecoveryServicesAsrFabric
$Container = Get-AzRecoveryServicesAsrProtectionContainer -Fabric $Fabric
Get-AzRecoveryServicesAsrReplicationProtectedItem -Protectioncontainer $Container |`
Format-Table FriendlyName,ProtectionState,ReplicationHealth,@{Label="Message";Expression={$_.ReplicationHealthErrors.ErrorMessage}}