How to delete a VM that is being protected by Azure Site Recovery

Share this:

In this Tutorial we are going over the process to force a deletion of a VM in System Center Virtual Machine Manager 2012 R2 when it has been protected with Azure Site Recovery protection. Most of the times, the administrator will remove the protection from the given VM before trying to delete, but in some LAB environment the subscription may not be even valid and the VM can be deleted right way. Note: Our recommendation is always to remove the protection and remove the VM afterwards when there is valid data on the VM.

A virtual machine that has Microsoft Azure Site Recovery protection enabled cannot be deleted.

Disable Microsoft Azure Site Recovery protection on the virtual machine and try the operation again.


When the administrator tries to delete the VM using the VMM console, the following error message will be displayed.


The administrator can always check the properties of the VM, and then on Hardware Configuration, click on Microsoft Azure Site Recovery on this section the information about the protection will be listed. In this specific case the VM is no longer required and the Azure subscription is no longer valid as well.


A simple way to remove the VM is using Virtual Machine Manager Command Shell, as follows:

Get-VM –VMHost <Hyper-V> | select name

Remove-VM –VM <VMName> –Force


After running the cmdlet above, the VM will be removed and it will be no longer available on VMM Console as well.


Written by Anderson Patricio

Anderson Patricio is a Canadian Exchange Server MVP and MCSM (Solutions Master) and he contributes to the Microsoft Community with articles, tutorials, blog posts, forums and book reviews. He is a regular contributor at, and (Portuguese).