Since Azure introduced the new portal, the recommendation to create is as below :
- Create Resource Group
- Create Azure Storage Account
- Create Azure VNET
That is the 3 basic items that MUST be created first before creating any VMs.
So now I face the “horror of cleaning up” after conducting some demos. The cleaning up is quite a challenge through the GUI Management Portal. Therefore I need to clear the entire Resource Group. Before I can delete that, I need to delete all the contents in the resource group. It’s very tedious.
Now I’ve found a way that I would like to share.
Update your local PowerShell with the Azure SDK. If not download it from here.
Once it’s installed, then you should have the Azure commands added into your PowerShell.
Launch the Run ISE as Administrator
Minimize the PowerShell Window.
- Launch IE (Internet Explorer)
- Go to https://portal.azure.com
- Login with your Azure Account
- Open another IE tab. Enter the https://resources.azure.com/ to access to Azure Resource Explorer.
- Expand the left panel
- Browse to the Resource Group
- Take note of the PowerShell command (which is going to help later).
- Maximize the PowerShell that was launch earlier (ISE) in Step 2
- Login using the command of Login-AzureRMAccount
- Take note of the SubscriptionId
- The command to remove the entire Resource Group is as follow :
Remove-AzureRMResource –ResourceId /subscriptions/SubscriptionId/resourceGroups/resourcegroupname/ –ApiVersion 2014-04-01 –Force
Note : Only make changes to the pink colour syntax. The first is your subscription ID information that you get from the top when you login to Azure and the second one is the resource group name.
- If you’re not so sure of the command, then refer to the command that you noted earlier in Step 3 from the Azure Resource Explorer.
- As example I would like to delete off the entire Resource Group of RG-CANADA-CENTRAL-01 in my subscription then I type the following :
- Once it’s completed removing the Resource Group, a True word is indicated.
So hopefully the above helps you as it has helped me in cleaning up the Resource Group.
keywords : azure, resource explorer, manage azure, azure portal , resource group, housekeeping resource group, new azure portal, manage azure portal