Skip to content

Instantly share code, notes, and snippets.

@yardbirdsax
Created November 19, 2019 19:22
Show Gist options
  • Save yardbirdsax/231f72426d85e6b983ea76aa242885ee to your computer and use it in GitHub Desktop.
Save yardbirdsax/231f72426d85e6b983ea76aa242885ee to your computer and use it in GitHub Desktop.
Removing an Azure Recovery Vault
$vault = Get-AzRecoveryServicesVault -ResourceGroupName euw-dbclus02 -Name euw-dbclus02-recoveryvault
$container = Get-AzRecoveryServicesBackupContainer -VaultId $vault.ID -ContainerType AzureVM
$PI = Get-AzRecoveryServicesBackupItem -Container $container -WorkloadType AzureVM -VaultId $vault.ID
Disable-AzRecoveryServicesBackupProtection -Item $PI -VaultId $vault.ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment