How do you reset Root Azure Subscription to remove all config and customisation

Mark Bavington 60 Reputation points
2023-06-18T14:26:10.13+00:00

Hi

I'm trying to restore/reset my root subscription/account to remove any custom configuration, settings caused by an Ent landing zone deployment.

I have tried to use the "Azure Settings" - "My Information" - "Restore Default Settings" and "Delete all settings and private dashboards", but it doesn't delete or reset customisation deployed to the subscription.

I'm trying to just reset the subscription to a blank canvas as you have when you first start with Azure, does anyone know if this is possible as I would have thought it would be, without the need to delete the root subscription and start again with a new one?

Any help please?

Thanks

Mark

Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
287 questions
{count} votes

Accepted answer
  1. Alistair Ross 7,466 Reputation points Microsoft Employee
    2023-06-18T19:45:03.2733333+00:00

    Hello

    There isn't a button for this ( I would imagine it could be a disaster if there was!). If you've deployed an enterprise landing zone, there are a few things that gets deployed

    • Management Groups
    • Resources (if selected) in the management, identity, network subscriptions
    • Azure Policies at various levels.
    1. First step would be to move the subscription(s) out of the management group hierarchy and delete the top level (not the root, you cannot delete that.) This will unassign and delete any policies at these levels
    2. Delete all policies that are scoped to the subscriptions, ensure they are no longer assigned and then delete them.
    3. Delete all the resources. Easiest way to do this is by deleting the resources groups. I typically use PowerShell to do this (https://learn.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcegroup?view=azps-10.0.0)
    4. Remove any permissions that you may have assigned.
    5. Change the name of the subscription (if you changed is as part of the landing zone)

    kind regards

    Alistair


1 additional answer

Sort by: Most helpful
  1. Luke Murray 11,436 Reputation points MVP Volunteer Moderator
    2023-06-18T19:47:31.36+00:00

    Hi, Mark

    If you want to delete all resources and direct policy and role assignments, you can take a look at an Azure Automation runbook I created:

    It targets subscriptions under a specific Management Group.

    Using the latest Windows PowerShell release - 7.2 (Preview), this script is built around the following capabilities:

    • Delete ALL resource groups (without a specific Tag) under all subscriptions, under a specific Management Group
    • Delete all resources within those resource groups
    • Delete Azure Recovery Vaults and their backed up items
    • Delete any Azure policy assignments, assigned directly to any subscription under the Management Group
    • Delete any Azure RBAC role assignments, assigned directly to any subscription under the Management Group.

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.