How to create a Resource Group in Azure

This Azure article will discuss the quick steps to create a Resource Group in Azure.

How to create Resource Group in Azure

Let us discuss all the possible approaches individually.

Approach-1 Using Azure Portal

To create a Resource Group in Azure, follow the below steps.

1. Log in to Azure Portal (https://portal.azure.com/)

2. Now, After logging in to the Azure Portal, search for the “Resource Groups” and click on the search result.

Create Resource Group azure

3. Then, on the Resource groups page, click on the +Add button

how to create azure resource group

4. On the Create a Resource group page, provide the below details

  • Subscription: Choose your subscription
  • Resource group: Enter a valid name for the Resource group
  • Region: Choose a region for the Resource group
create azure resource group

Click on the Review + Create button.

5. It will show that Validation passed. Then click on the Create button on the Create a resource group page.

How to create a Resource Group in azure

Now you can see the Resource group was created successfully.

how to create a resource group in azure using powershell

This is how we can create a resource group using the Azure Portal.

Approach-2: Using PowerShell

Follow the below steps to create a resource group using PowerShell.

Before creating the resource group in PowerShell, you must install Azure PowerShell (Microsoft Azure PowerShell) on your machine. 

If you have the Microsoft Azure PowerShell module installed on your computer, follow the steps below.

Open the PowerShell ISE or Windows PowerShell module as Run as Administrator mode.

how to create resource group in azure powershell

If you have installed the Azure PowerShell module, check its version and consider installing the latest version. Use the PowerShell cmdlet below to check the version.

PS C:\WINDOWS\system32> Get-Module -ListAvailable -Name AzureRm.Resources | Select Version
create a resource group in Powershell

Login to Azure account

Before working with the Azure resource group, use the Login-AzureRmAccount cmdlet to log in to your Azure Account.

PS C:\WINDOWS\system32> Login-AzureRmAccount
how to create a resource group in azure using powershell

Provide your Azure credentials to log in and move to the next step.

Get subscription details

You can check the Subscription details using the below PowerShell cmdlet in case you have multiple subscriptions.

PS C:\WINDOWS\system32> Get-AzureRmSubscription

create resource group azure powershell

In case of multiple Subscription, use the below cmdlet to switch for a particular Subscription

PS C:\WINDOWS\system32> Set-AzureRmContext –SubscriptionId {SubscriptionId}

You can also use the below PowerShell cmdlet

PS C:\WINDOWS\system32> Set-AzureRmContext -SubscriptionName "{SubscriptionName}"

Create a Resource Group

Finally, use the New-AzureRmResourceGroup cmdlet to create a resource group

PS C:\WINDOWS\system32> New-AzureRmResourceGroup -Name myresgrp -Location "Central US"

The name parameter specifies the resource group’s name, and the location parameter sets its location.

After executing the above command, I got the expected output, and the Resource Group was created successfully, as shown in the screenshot below.

how to create resource group in azure using powershell

Approach-3 Using Azure CLI

Let’s see how to create a resource group in Azure using Azure CLI. You can use the below Azure CLI script.

az group create --name MyAzureLessonsgrp --location "East US"

After executing the above script, the Resource Group was created successfully, as shown in the screenshot below.

how to create resource group in azure cli

Once it is created, you can use the below command to list all the resource groups

az group list

How to create Azure Resource Group – Video Tutorial

This video tutorial will help you know the initial steps to create a Resource Group in Azure.

Conclusion

This Azure article discussed how to create a Resource Group in Azure. Thanks for reading this article !!!

You may also like the following articles below

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!