Tag ASR disks to match owner VM

Chrissy Gentry 1 Reputation point
2020-09-02T20:18:17.08+00:00

Hello,

I am looking to tag all disk resources with an environment type tag. Currently I have this working with VMs that have attached disks by using the VM naming standard. I would also like to tag the disk in the disaster recovery resource group, however these are technically unattached disks.

My question, does anyone know how I can use powershell to tag the ASR disks to match their replicated Owner? I cannot use the VMName, or the Name of the disk either for the ASR disks. I need to be able to connect it back to its owner to get the proper environment tag.

Thank you!

Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
672 questions
{count} votes