Hello,
I am trying to automate the process of identifying and deleting unused resources, as well as finding resources with duplicate names, in my Azure environment.
Specifically, I want to:
- Find unused resources in my Azure subscription (e.g., orphaned VMs, unattached disks, unused public IPs, etc.).
- Identify resources with duplicate names within the same resource group or subscription.
- Delete these resources automatically using a script or code.
I am looking for guidance on:
- The best tools or services in Azure to query resources (e.g., Azure Resource Graph, Azure CLI, PowerShell, etc.).
- Sample scripts or methods for detecting unused resources and duplicate names.
- Best practices for safely deleting these resources to avoid any critical issues.
Any help, script examples, or advice would be greatly appreciated!
Thank you in advance!
Hello,
I am trying to automate the process of identifying and deleting unused resources, as well as finding resources with duplicate names, in my Azure environment.
Specifically, I want to:
- Find unused resources in my Azure subscription (e.g., orphaned VMs, unattached disks, unused public IPs, etc.).
- Identify resources with duplicate names within the same resource group or subscription.
- Delete these resources automatically using a script or code.
I am looking for guidance on:
- The best tools or services in Azure to query resources (e.g., Azure Resource Graph, Azure CLI, PowerShell, etc.).
- Sample scripts or methods for detecting unused resources and duplicate names.
- Best practices for safely deleting these resources to avoid any critical issues.
Any help, script examples, or advice would be greatly appreciated!
Thank you in advance!