How do I purge old automation accounts?

co 20 Reputation points
2025-06-19T03:45:04.73+00:00

We have several Azure Automation Accounts that were originally created via Azure DevOps pipelines during earlier infrastructure deployments.

Can someone please confirm:

What is the best way to permanently delete/purge these Automation Accounts (via CLI, PowerShell, or policy)?

If this cannot be done via the Developer support plan, would a temporary upgrade be required to request cleanup assistance?

Alternatively, is there a billing or subscription support channel that can assist with removing unused service artifacts?

Any official guidance or recommended cleanup script is greatly appreciated.

Thank you in advance.

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,368 questions
{count} votes

Accepted answer
  1. Alex Burlachenko 10,565 Reputation points
    2025-06-19T07:48:25.7933333+00:00

    Hi co, great question )) cleaning up old automation accounts can save u money and keep things tidy.

    u can totally delete automation accounts using powershell or az cli.

    Remove-AzAutomationAccount
    

    or if u prefer az cli, try this

    az automation account delete 
    

    microsoft docs have more deets here https://docs.microsoft.com/en-us/powershell/module/az.automation/remove-azautomationaccount. pretty straightforward, right? )

    now about that support plan thing... aha, good thinking! u dont necessarily need to upgrade. start by checking the 'quota and limits' section in azure portal. sometimes u can request cleanup help without paying extra. but yes, if u hit a wall, temporary upgrade might unblock u.

    also worth poking around azure advisor )) it often spots unused resources begging to be deleted. here's the link https://docs.microsoft.com/en-us/azure/advisor/advisor-overview. microsoft really made this tool handy for cleanup!

    always check billing alerts first. they're like canaries in coal mines for unused stuff. most cloud platforms have similar cost management tools. set up cleanup policies early next time! terraform or arm templates can auto-expire test resources. works in aws too btw ))

    microsoft actually has decent lifecycle management docs here https://docs.microsoft.com/en-us/azure/automation/automation-intro. worth bookmarking!

    and before u delete anything... maybe export runbooks u might need later? just saying ))

    hope this helps. let me know if u get stuck anywhere

    rgds,

    Alex


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.