When we create an Azure VM, we create and attach data disks too in that VM. Sometimes while deleting the VM we leave the Data Disks to preserve the data or sometimes by mistake.
By default, the delete with VM option for the OS disk is enabled and for the data disk it's disabled, so unless you enable that option the data disk will not be deleted automatically at the time of VM deletion.
These unattached and unused data disks will add up to the Azure bills, as they are lying unused and unattached it's better to find such disks and delete them to save the unwanted costs in our monthly bills.
We have created the below script that will check all the unattached Azure disks in all your azure subscriptions and provide you with a list of such disks along with their sizes. You have to create an azure profile once using our previous post and use that profile to run this script unattended by scheduling it as per your need using Tasks Scheduler.
0 comments:
Post a Comment