FIX: Vault cannot be deleted as there are existing resources within the vault

Resource Groups and Azure Recovery Services Vaults.

In my own Azure developer tenant, I have several resource groups that needed to be cleaned up. I couldn’t remove one resource group.

Vault cannot be deleted as there are existing resources within the vault.
Vault cannot be deleted as there are existing resources within the vault.

The only thing left was Azure Recovery Service Vaults.
After trying to manually remove the RSV I got the following error message:

Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no backup items, protected servers or backup management servers associated with this vault. Unregister the following containers associated with this vault before proceeding for deletion : VM-TST1-MGT-01.BW2.LOCAL Unregister all containers from the vault and then retry to delete vault.
Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no backup items, protected servers or backup management servers associated with this vault. Unregister the following containers associated with this vault before proceeding for deletion : VM-TST1-MGT-01.BW2.LOCAL Unregister all containers from the vault and then retry to delete vault.

There is a Azure Backup agent linked in the RSV with a C-drive of a server that is already removed.
And when you go to Azure Backup Agents in your Recovery Services Vault and you open the agents there, there is no option to delete the drive.

Vault cannot be deleted as there are existing resources within the vault.
Vault cannot be deleted as there are existing resources within the vault.

Well, this option is a kind of hidden in RSV. In the tutorial below I explain how you can find it.


Let’s remove the Azure Recovery Services Vault.

If you open the Azure Recovery Services Vault, and then go to the vault in question, you have Backup infrastructure in the menu. Open Backup infrastructure.

Then go to Protected Servers and then choose Protected Servers (Azure backup agent).
Here you can delete the Protected server in question and then you can remove the RSV.

Vault cannot be deleted as there are existing resources within the vault.
Vault cannot be deleted as there are existing resources within the vault.

The complete error message

Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no backup items, protected servers or backup management servers associated with this vault. Unregister the following containers associated with this vault before proceeding for deletion : VM-TST1-MGT-01.BW2.LOCAL Unregister all containers from the vault and then retry to delete vault.

Published by

Bas Wijdenes

My name is Bas Wijdenes and I work as a PowerShell DevOps Engineer. In my spare time I write about interesting stuff that I encounter during my work.

Leave a Reply

Your email address will not be published. Required fields are marked *