We are using Azure to Azure Site Recovery for our Virtual Machines, but when we fail them over and re-protect, the Virtual Machines are cleaned up (removed), but the NIC still remains (and still has the Static IP associated with it). How do we clean up the VM?
As a bit of background we use a script to associate Public IP to the NIC when failing over based on this: https://gallery.technet.microsoft.com/scriptcenter/Add-Public-IP-and-NSG-to-a6bb8fee
Is it possible the fact we change the NIC (associate NSG and Public IP) means that azure doesn't delete it?
How can we delete it automatically? I can't see a way to run a post-script on re-protect.