In this azure tutorial, we will discuss Delete Azure Account. Apart from this, we will also discuss on few other topics
- how to cancel an Azure subscription
- Suspend a subscription
- Reactivate a disabled Azure subscription
- How to Remove Azure Account using PowerShell
- Delete a tenant in Azure Active Directory
- Azure Delete Resource Group
- Azure Delete Resource Group PowerShell
Table of Contents
Delete Azure Account
Well, let’s discuss here how to delete azure account or how to cancel azure subscription
As we have discussed already, Microsoft provides lots of services and features with Azure subscription. But if you don’t like those of you may thinking Microsoft is charging more for what you are using or you are thinking the other vendors can fulfill your requirement with less price compared to Microsoft Azure.
- 7 Key Benefits of Microsoft Azure + Azure for Business
- What VPN Types are Supported By Azure
- You are not eligible for an Azure subscription
Or, maybe you are a beginner and you might have created this subscription just for the learning purpose and don’t want to pay once the trial period is going to over or you might have an old account which you don’t want to continue with.
So, there can be multiple reasons associated when you have decided to delete your account or subscription. When you have decided to delete the Azure account, you should delete it properly.
If you will not delete properly, then Microsoft will charge for the resources that are running under your subscription and it will be automatically deducted from your Credit card associated with the Subscription.
So, it is suggested to delete the Azure account or Subscription properly when you have decided to delete those.
You must delete all the Azure resources, for example, Virtual Machines, Storages, containers, Networks, Resource groups, etc
To know, how to delete Azure subscription, follow the below steps
First step is to login to the Microsoft Azure portal (https://portal.azure.com/)
Once you Login to the Azure Portal, Click on the Cost Management + Billing link from the left navigation
On the Cost Management + Billing page, click on the Subscriptions link from the left navigation
Now, click on the Manage button on the Cost Management + Billing page.
Now you can able to see your Subscription name, click on the Subscription name
Now the next step is, click on the Cancel subscription link from the below screen to Cancel Azure Subscription
Finally, select the Yes, cancel my subscription option and select one Reason for Cancellation then click on the Tick button as highlighted below.
This is how we can delete Azure subscription
Suspend Azure Subscription
If a Microsoft Partner wish to suspend azure subscription, he can able to do that with few clicks
Follow the below steps to suspend a subscription
The first step is to log in to the Partner Center Dashboard (https://partner.microsoft.com/en-us/dashboard/directory)
Now select the Customers and select the particular customer from the list of Customers
The next step is to choose the subscription that you wish to suspend.
Now you should able to see the Status section, Choose Suspended from the list of Status then finally click on the Submit button to apply the changes you made.
Now if you changed your mind and keep your data as it is then within 90 days you can able to reactive the subscription within 90 days. If you didn’t reactivate the subscription, then all your get deleted.
This is how we can Suspend Azure Subscription using the Partner Center Dashboard.
Reactivate a disabled Azure subscription
By chance, if you have accidentally deleted your Azure Subscription or canceled your Azure Subscription, then you can Reactivate the Subscription using the below steps.
First, Login to https://account.azure.com/Subscriptions
Now the next step is to Select the subscription you have cancelled already.
Once you have selected the subscription then finally click on the Reactivate button to Reactivate your canceled subscription.
So, this is how we can Reactivate a disabled Azure Subscription.
How to Remove Azure Account using PowerShell
Well, let’s discuss here, How to Remove Azure Account using PowerShell
The first step is, make sure you have the Azure module installed in your system. If not or you are getting any error while installing the Azure module, then you can refer to my Article The term ‘Get-AzureAccount’ is not recognized error to install the Azure module.
Now, you have the Azure module installed in your machine, the next step is to execute the below command to get the details of all of your subscription
PS C:\WINDOWS\system32> Get-AzureAccount | format-table id
PS C:\WINDOWS\system32> Get-AzureAccount
Note: Since I don’t have many subscriptions with this account I am not getting the complete list but in your case, you will get all your subscription details with your account.
After executing the command, you will get all your Subscription details with the Id, Type, Subscriptions, Tenant details. Copy the Id of the subscription or the name which one you want to delete. Make sure you choose the correct Subscription ID.
Now to remove the Azure subscription, use the below cmdlet
PS C:\WINDOWS\system32> Remove-AzureAccount account-name
Note: Before executing the Remove-AzureAccount command, make sure you have decided to delete the Azure account.
This is how we can Delete Azure Account using PowerShell.
Delete a tenant in Azure Active Directory
Here we will discuss, to delete azure tenant using the Azure portal.
Note: The account that you will use to delete the tenant should be the Global Administrator for your organization. The account should have Global Administrator access.
Well, let’s discuss the steps to delete azure directory using the Azure Portal.
Step-1: Login to Azure AD admin center ( https://aad.portal.azure.com/)
Step-2: Once you will log in to the Azure AD admin center, click on the Azure Active Directory link.
Step-3: Now click on the Switch tenant button if you want to switch the tenant and then click on the Delete tenant button to delete the tenant in Azure Active Directory.
Step-4: Now the next step is it will check all the pass for your Organization, Once it will pass all the check then after you need to click on the Delete button to delete the tenant using Azure Active Directory.
This is how we can delete azure directory using the Azure Portal.
Azure Delete Resource Group
As we have already discussed, Resource Group is a logical container that contains all the Azure Resources. Follow the below steps, If you want to perform Azure Delete Resource Group using the Azure Portal.
Step-1: Login to the Microsoft Azure portal (https://portal.azure.com/)
Step-2: Search for the resource groups and then click on the Resource groups that displayed on the search result.
Step-3: Now you can able to see the list of resource groups you have created as of now. Then click on the resource group that you want to delete.
Step-4: On the Resource group page, click on the Delete resource group button.
Step-5: Now you can type the resource group name for the Type Resource Group Name option and then click on the Delete button to delete the Resource Group.
Step-6: Now if you can see below the Resource Group deleted successfully.
This is how we can perform Azure Delete Resource Group using the Azure Portal easily.
Azure Delete Resource Group PowerShell
We discussed above how to delete the Azure Resource Group using the Azure portal, now let’s discussed how can we delete the Resource Group using PowerShell.
Follow the below steps to perform Azure Delete Resource Group PowerShell
First you need to open the PowerShell ISE as Run as administrator mode
Then the next step is to connect to the Azure rm account with connect-azurermaccount cmdlet
PS C:\WINDOWS\system32> connect-azurermaccount
Now the next step is to get the Azure Rm Subscription details using the Get-AzureRmSubscription cmdlet.
PS C:\WINDOWS\system32> Get-AzureRmSubscription
Then, you need to get your subscription id from the Azure portal. you can refer to my article New-AzureRmResourceGroup: ‘this.Client.SubscriptionId’ cannot be null, where I have described, how you will get your subscription Id from the Azure Portal.
Once you will get your Subscription Id now you need to run the below PowerShell cmdlet
PS C:\WINDOWS\system32> Select-AzureRmSubscription -SubscriptionId ######-dee5-4518-9c9c-feaa72a5cbd1
Finally, you need to run the below PowerShell cmdlet to remove the Azure Resource Group
PS C:\WINDOWS\system32> Remove-AzureRmResourceGroup -Name "newresgroup-1149163853"
Note: You can change the resource group named based on yours.
Now the complete script you need to run to delete the Azure Resource Group is
connect-azurermaccount Get-AzureRmSubscription Select-AzureRmSubscription -SubscriptionId #######-dee5-4518-9c9c-feaa72a5cbd1 Remove-AzureRmResourceGroup -Name "newresgroup-1149163853"
After running the above script, click on the Yes button to confirm the deletion process.
Now it will delete the Azure Resource group successfully with out any issue.
You may also like the below tutorial
- The term ‘Get-AzureAccount’ is not recognized error
- Top 50 Azure Interview Questions and Answers latest
Well, in this tutorial, we discussed how to delete Azure subscription, how to cancel an Azure subscription, suspend the azure subscription. Apart from that, we also saw if you have accidentally delete Azure subscription or cancel an Azure Subscription, how we can Reactivate a disabled Azure subscription, then we also discussed how to Remove Azure Account using PowerShell, delete azure active directory tenant, Suspend Azure Subscription, Delete a tenant in Azure Active Directory, How to Remove Azure Account using PowerShell and finally we saw Azure Delete Resource Group using the Azure Portal and Azure Delete Resource Group using PowerShell as well.