title | description | author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|
Delete an Azure Site Recovery vault |
Learn how to delete a Recovery Services vault configured for Azure Site Recovery |
ankitaduttaMSFT |
site-recovery |
how-to |
03/29/2024 |
ankitadutta |
This article describes how to delete a Recovery Services vault for Site Recovery. To delete a vault used in Azure Backup, see Delete a Backup vault in Azure.
[!INCLUDE updated-for-az]
Before you can delete a vault you must remove registered servers, and items in the vault. What you need to remove depends on the replication scenarios you've deployed.
- Follow these instructions to delete all protected VMs.
- Then, delete the vault.
- Follow these instructions to delete all protected VMs.
- Follow these steps to delete all replication policies.
- Delete references to vCenter using these steps.
- Follow these instructions to decommission a configuration server.
- Then, delete the vault.
- Follow these steps to delete Hyper-V VMs managed by System Center VMM.
- Disassociate and delete all replication policies. Do this in your vault > Site Recovery Infrastructure > For System Center VMM > Replication Policies.
- Follow these steps to unregister a connected VMM server.
- Then, delete the vault.
- Follow these steps to delete all protected VMs.
- Disassociate and delete all replication policies. Do this in your vault > Site Recovery Infrastructure > For Hyper-V Sites > Replication Policies.
- Follow these instructions to unregister a Hyper-V host.
- Delete the Hyper-V site.
- Then, delete the vault.
Important
If you're testing the product and aren't concerned about data loss, use the force delete method to rapidly remove the vault and all its dependencies. The PowerShell command deletes all the contents of the vault and is not reversible.
To delete the Site Recovery vault even if there are protected items, use these commands:
Connect-AzAccount
Select-AzSubscription -SubscriptionName "XXXXX"
$vault = Get-AzRecoveryServicesVault -Name "vaultname"
Remove-AzRecoveryServicesVault -Vault $vault
Learn more about: