---
title: "Smart Ways to Rename Azure Resource Groups (GUI and CLI)"
description: "Unlock the secret to Rename Azure Resource Groups! Dive into our easy guide for reshaping your Azure landscape with Portal, PowerShell, and CLI techniques."
canonical: "https://adamtheautomator.com/rename-azure-resource-group/"
---

# Smart Ways to Rename Azure Resource Groups (GUI and CLI)

> Unlock the secret to Rename Azure Resource Groups! Dive into our easy guide for reshaping your Azure landscape with Portal, PowerShell, and CLI techniques.

Source: https://adamtheautomator.com/rename-azure-resource-group/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Smart Ways to Rename Azure Resource Groups (GUI and CLI)](https://adamtheautomator.com/wp-content/uploads/2021/05/How-to-RenameMove-Azure-Resource-Groups-GUI-and-CLI.jpg)

# Smart Ways to Rename Azure Resource Groups (GUI and CLI)

[![](https://secure.gravatar.com/avatar/94929e2a9467837680215d49c20a89a987164984b10b10ecea0b82d8f7f843e3?s=192&d=mm&r=g)Steve Sherry](https://adamtheautomator.com/author/steve-sherry/)11 January 20247 min. read

Categories: [Cloud](/category/cloud/)

Tags:[Microsoft Azure](/tag/microsoft-azure/)

Table of Contents

*   [Prerequisites](#h-prerequisites)
*   [Moving Resources Using The Azure Portal](#h-moving-resources-using-the-azure-portal)
*   [Moving Resources Using Azure PowerShell](#h-moving-resources-using-azure-powershell)
*   [Moving Resources Using Azure CLI](#h-moving-resources-using-azure-cli)
*   [Conclusion](#h-conclusion)

Have you ever created an [Azure Resource Group (RG)](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal#what-is-a-resource-group) and realized later that you’d misspelled the name? Or maybe even used the wrong name completely! Your initial reaction would probably be to rename the Azure Resource Group. But can you?

Unfortunately, Azure does not support renaming an RG. This [rename function request](https://feedback.azure.com/forums/281804-azure-resource-manager/suggestions/6017710-rename-resource-groups) has been in limbo since 2014. If you’ve only created the RG and have not added resources to it yet, the quickest workaround is to delete the RG and create a new one.

But if the RG is not empty, you obviously cannot delete it right away to start over. What do you do then? Lucky for you, this article will teach you the next best thing—to move resources to a new RG as a way to rename Azure Resource Groups. Let’s get started!

## Prerequisites

This article will be a tutorial. If you plan on following along step-by-step, you will need the following:

*   An Azure Subscription – If you don’t have one, you can [register for a free Azure account](https://azure.microsoft.com/en-us/free/).
*   An Azure user account – The user account must have at least a [Contributor Role](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#contributor) permission to the Azure subscription. This role enables you to create and delete resource groups and move resources between resource groups.
*   Two [resource groups](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal#create-resource-groups) – Where you’ll be moving resources from and to. In this tutorial, the two resource groups are:
    *   **_rg-my-old-resourcegroup_** – The source RG contains two resources; a [Virtual Network](https://docs.microsoft.com/en-us/azure/virtual-network/quick-create-portal#create-a-virtual-network) named _vn-eus-vnet-01_ and a [Storage Account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal#create-a-storage-account-1) named _adamtheautomator_.
    *   **_rg-my-new-resourcegroup_ –** The empty destination RG, which is the target for moving the resources from _rg-my-old-resourcegroup._

> _This tutorial will only cover moving resources between resource groups in the same Azure subscription. Moving of resources between subscriptions is possible subject to the [move operation support for resources](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/move-support-resources) in Azure._

## Moving Resources Using The Azure Portal

If not automating a task, even IT pros would most likely favor the Azure Portal to manage Azure resources. Using the Azure Portal, you can visually review the available resources and move them into a new RG with a few mouse clicks.

> _While moving resources, both the source and destination resource groups will be in a locked state that may last for a maximum of four hours. When resources are in a locked, you cannot add, update, or delete them. The resources themselves will remain functional and unlocked._

Follow the steps below to move resources to another resource group.

1\. Open a web browser and navigate to the [Azure Portal](https://portal.azure.com/).

2\. On the Search box at the top, type _resource groups_. As you type, the portal offers you a match. Click on **Resource groups** on the list of results.

![Open the Resource Groups blade.](https://adamtheautomator.com/wp-content/uploads/2021/05/GuiOpenRg.png)

Open the Resource Groups blade.

3\. On the **Resource groups** page, click the source RG, which is **rg-my-old-resourcegroup,** to view the resources it contains.

![Identify the source and destination Resource Groups](https://adamtheautomator.com/wp-content/uploads/2021/05/Untitled-23-2.png)

Identify the source and destination Resource Groups

4\. Next, select the resources to move. In this tutorial, those resources are: _adamtheautomator_ and _vn-eus-vnet01_. After selecting the resources, click **Move —> Move to another resource group**.

![Select the resources to move to a new Resource Group.](https://adamtheautomator.com/wp-content/uploads/2021/05/GuiSelectResources.png)

Select the resources to move to a new Resource Group.

5\. On the **Move resources** page, click to check the **Select all** box to select all resources.

Next, under the **Move these resources to** section, select **rg-my-new-resourcegroup** from **Resource group** the dropdown box.

Check the box to confirm that you understand that any existing tools and scripts will not work until you update them with new resource IDs. Click **OK** to proceed.

> _The RG name forms part of the unique path to a resource in the same way that a folder name forms part of the path for a file. Using the unique path is how a resource is accessed programmatically. Moving a resource will therefore impact any scripting resources you have created._

![Choose the new Resource Group.](https://adamtheautomator.com/wp-content/uploads/2021/05/GuiStartMove.png)

Choose the new Resource Group.

6\. To see the progress, click the bell icon on the upper-right part of the page. As you can see on the screenshot below, the current status says **Moving resources**.

![Check the notifications tab to status updates. ](https://adamtheautomator.com/wp-content/uploads/2021/05/GuiBellIcon-1.png)

Check the notifications tab to status updates.

In this example, the moving process took approximately five minutes to complete. Your experience may be different. After Azure completed the resource move, the status then changes to **Moving resources complete**, as you can see below.

Click the X button on the top-right to close the notification. Closing the notification will bring you back to the **rg-my-old-resourcegroup** page.

![Moving resources complete status message.](https://adamtheautomator.com/wp-content/uploads/2021/05/GuiMoveComplete.png)

Moving resources complete status message.

7\. Back on the **rg-my-old-resourcegroup** page, you’ll notice the message that says **No resources to display**. This message is the result of moving the resources to another resource group. Click the **X** in the upper-right to close the page.

![Verify the resources no longer exist in the old resource group.](https://adamtheautomator.com/wp-content/uploads/2021/05/GuiOldResourceGroup.png)

Verify the resources no longer exist in the old resource group.

8\. To confirm that the resources are now in the destination resource group, click the **Resource groups** breadcrumb link on the top of the page.

![Clicking the Resource groups breadcrumb link ](https://adamtheautomator.com/wp-content/uploads/2021/05/Untitled-24-2.png)

Clicking the Resource groups breadcrumb link

Next, on the list of resource groups, click **rg-my-new-resourcegroup.**

![Opening the destination resource group ](https://adamtheautomator.com/wp-content/uploads/2021/05/Untitled-25-2.png)

Opening the destination resource group

You should now see the resources that you moved from the **rg-my-old-resourcegroup** are now in **rg-my-new-resourcegroup**.

![Verify the resources now exist in the new resource group.](https://adamtheautomator.com/wp-content/uploads/2021/05/Untitled-26-2.png)

Verify the resources now exist in the new resource group.

## Moving Resources Using Azure PowerShell

If you prefer typing commands more than clicking the mouse to manage Azure, then Azure PowerShell could be the right tool for you. There are two ways you can use PowerShell to manage Azure—locally on your computer or from the [Azure Cloud Shell](https://docs.microsoft.com/en-us/azure/cloud-shell/overview).

This tutorial will be using the Azure Cloud Shell, where the [Az PowerShell module](https://docs.microsoft.com/en-us/powershell/azure/?view=azps-7.3.2&viewFallbackFrom=azps-5.9.0) comes pre-installed. The Az PowerShell module provides a variety of cmdlet that you can use to manage Azure from PowerShell.

> _Should you choose to use Azure [PowerShell](https://adamtheautomator.com/what-is-powershell/) on your local computer, you’ll need to [install the Az PowerShell module](https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-7.3.2) and then [sign in to Azure](https://docs.microsoft.com/en-us/powershell/azure/authenticate-azureps?view=azps-5.9.0#sign-in-interactively) with your Azure account._

Related:[What Is PowerShell And Why Use It?](https://adamtheautomator.com/what-is-powershell/)

To move Azure resources using the Azure PowerShell, proceed as follows.

> _If you’re accessing the Azure Cloud Shell for the first time, Azure may ask you to [choose which subscription to create the storage account](https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart#start-cloud-shell) that the shell will use._

1\. Open your browser and navigate to [https://shell.azure.com/](https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?redirect_uri=https%3A%2F%2Fportal.azure.com%2Fsignin%2Findex%2F&response_type=code%20id_token&scope=https%3A%2F%2Fmanagement.core.windows.net%2F%2Fuser_impersonation%20openid%20email%20profile&state=OpenIdConnect.AuthenticationProperties%3DX9Un-OmVqNpuNpyEqGpDCG8hz9mHWNv1Doabo1FDdOQMhoPCAS8w1YIvqnuvgOpZe47I7ZHKd0Iz4Vzv6CaA0XJhewsd9vL6C6t0pHt-HQEA3uUCxHGI-aTuJd5b8Lp6vKhh0JefeDWTKJodPeOm_npQ6Nly5bEOf1HS8NMUjncA327DWSVkCGCR6oXbUcvejjnrY3CCfXftkdi4jc7Tm-U2Lu_5VkQ7xN-Nt85q1ZxRbDhUAMRtCWlNyvTpF8R70a0JW_H7Rd84xDByoorxMwHpXcLTygc5BZHDvDt7ciLPh0fhcGMghtMdwQmSuYjL_23eDcXh3AwFTsk_L9TJIBfJL9FVILg02R__a8-R-18xJJ-g7xD4RHhLuowegAS_W1OVfBbRE246Q2967jILhg&response_mode=form_post&nonce=637832233575440955.ZDk4NDE0MGEtMGZkYS00NzVhLWIyYzctYzhiMjg2ZTBkNGEwMWRjNDE1ZTQtZTUxYi00YTU0LTlkMDQtZDcxZTFkMzc3OGEy&client_id=c44b4083-3bb0-49c1-b47d-974e53cbdf3c&site_id=501430&client-request-id=a025d6f6-a1f4-44cd-8166-61a21cf97092&x-client-SKU=ID_NET472&x-client-ver=6.12.2.0&sso_reload=true). Or, if you’re already at the Azure Portal, click the Cloud Shell button next to the Search box.

![Launching the Azure Cloud Shell](https://adamtheautomator.com/wp-content/uploads/2021/05/Untitled-27-2.png)

Launching the Azure Cloud Shell

2\. Once the Cloud Shell is ready, on the upper-right corner, confirm that **PowerShell** is the active environment and not **Bash**. If not, click the dropdown box and select **PowerShell**.

![Selecting the PowerShell environment in Azure Cloud Shell](https://adamtheautomator.com/wp-content/uploads/2021/05/Untitled-28-2.png)

Selecting the PowerShell environment in Azure Cloud Shell

3\. Next, run the [az resource list](https://docs.microsoft.com/en-us/cli/azure/resource?view=azure-cli-latest#az_resource_list) command to get the ID of the resources you plan to move. The ID value is a unique identifier of each Azure resource.

```powershell
# Get the list of resources and store them in a variable.
 $resources = Get-AzResource -ResourceGroupName rg-my-old-resourcegroup
# Display the ResoureID values on the screen.
 $resources.ResourceId
```

![Getting the ResourceId values](https://adamtheautomator.com/wp-content/uploads/2021/05/PowerShellResourceIds-1.png)

Getting the ResourceId values

4\. Now, execute the [`Move-AzResource`](https://docs.microsoft.com/en-us/powershell/module/az.resources/move-azresource?view=azps-7.3.2) command below in your Azure PowerShell window. This command will move the resources you’ve stored inside the `$resources` variable to the destination resource group.

```powershell
# Move the resources to the destination resource group rg-my-new-resourcegroup
 Move-AzResource -DestinationResourceGroupName rg-my-new-resourcegroup -ResourceId $resources.ResourceId
```

5\. At the next prompt, confirm the move by pressing **Y** and press Enter. The resource move duration may last from few seconds to several minutes. In this example, the move took approximately 30 seconds to complete.

![Moving resources into a new resource group using PowerShell](https://adamtheautomator.com/wp-content/uploads/2021/05/PowerShellAreYouSure.png)

Moving resources into a new resource group using PowerShell

6\. After completing the resource move, execute each command below. These commands will get the list of resources in each resource group, which will help you confirm if the resource move was successful.

```powershell
# Gets a list of resources in the source resource group
 Get-AzResource -ResourceGroupName rg-my-old-resourcegroup
# Gets a list of resources in the destination resource group
 Get-AzResource -ResourceGroupName rg-my-new-resourcegroup
```

As you can see below, the first command did not retrieve any resources from the source RG. At the same time, the second command showed that the resources now exist in the destination RG. This result confirms that the resource move operation was successful.

![Confirming that resources have moved into a new resource group.](https://adamtheautomator.com/wp-content/uploads/2021/05/PowerShellConfirmMove-1.png)

Confirming that resources have moved into a new resource group.

## Moving Resources Using Azure CLI

Another excellent command-line tool for managing Azure resources is the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/). Like Azure PowerShell, you can use Azure CLI locally on your computer and the Azure Cloud Shell. This tutorial will use the Azure Cloud Shell, where Azure CLI is already pre-installed.

> _Should you choose to use Azure CLI on your local computer, you’ll need to [install Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) and [sign in to Azure](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli)._

To move Azure resources using Azure CLI on the Azure Cloud Shell, follow these steps.

> _If you’re accessing the Azure Cloud Shell for the first time, Azure may ask you to [choose which subscription to create the storage account](https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart#start-cloud-shell) that the shell will use._

Related:[Getting Started with the Azure CLI](https://adamtheautomator.com/azure-cli/)

1\. Open your browser and navigate to [https://shell.azure.com/](https://shell.azure.com/). Or, if you’re already at the Azure Portal, click the Cloud Shell button next to the Search box.

![Launching the Azure Cloud Shell ](https://adamtheautomator.com/wp-content/uploads/2021/05/Untitled-29-2.png)

Launching the Azure Cloud Shell

> _Azure CLI works on both the PowerShell and Bash cloud shell. For this tutorial, you’ll be working with the Bash shell experience._

2\. Once the Cloud Shell is ready, confirm that **Bash** is the active environment and not **PowerShell** in the upper-right corner. If not, click the dropdown box and select **Bash**.

![Selecting the Bash environment in Azure Cloud Shell](https://adamtheautomator.com/wp-content/uploads/2021/05/OpenBashTerminal.png)

Selecting the Bash environment in Azure Cloud Shell

Next, run the [`az resource list`](https://docs.microsoft.com/en-us/cli/azure/resource?view=azure-cli-latest#az_resource_list) command to get the ID of the resources you plan to move. The ID value is a unique identifier of each Azure resource.

```bash
# Capture the ResourceID values of each resource and store them in a variable.
 oldresources=$(az resource list --query "[?resourceGroup=='rg-my-old-resourcegroup'].{ name: id }" --output tsv)
# Display the ResourceID values on the screen
 echo "${oldresources[*]}"
```

![az resource list command](https://adamtheautomator.com/wp-content/uploads/2021/05/Untitled-30-2.png)

`az resource list` command

4\. Now, execute the [`az resource move`](https://docs.microsoft.com/en-us/cli/azure/resource?view=azure-cli-latest#az_resource_move) command below. This command will move the resources you’ve stored inside the `oldresources` variable to the destination resource group.

```bash
# Passes the captured ids into the az resource move command
 az resource move --destination-group rg-my-new-resourcegroup --ids $oldresources
```

During the move, you will not have control of the shell, and you can only wait for the move operation to finish. The resource move duration may last from few seconds to several minutes. In this example, the move took approximately five minutes to complete.

5\. After completing the resource move, execute each command below. These commands will get the list of resources in each resource group, which will help you confirm if the resource move was successful.

```bash
# Gets a list of resources in the source resource group
 az resource list --query "[?resourceGroup=='rg-my-old-resourcegroup'].{ name: id }" --output tsv
# Gets a list of resources in the destination resource group
 az resource list --query "[?resourceGroup=='rg-my-new-resourcegroup'].{ name: id }" --output tsv
```

The result below shows that the first command did not retrieve any resources from the source RG. At the same time, the second command showed that there are now resources in the destination RG.

![Confirming that resources have moved into a new resource group](https://adamtheautomator.com/wp-content/uploads/2021/05/MovedResources.png)

Confirming that resources have moved into a new resource group

## Conclusion

This article’s goal was to teach you how to work around Azure’s lack of resource group rename functionality. You’ve learned three methods of moving resources as a way to rename Azure resource groups. Why get stuck with poorly named resource groups when you can change them?

Between using the Azure Portal, Azure PowerShell, and Azure CLI, which method did you like best? Also, you could learn further by moving different resource types between subscriptions too, and you might discover possible incompatibilities and unsupported scenarios.

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Frename-azure-resource-group%2F&text=Smart%20Ways%20to%20Rename%20Azure%20Resource%20Groups%20\(GUI%20and%20CLI\))[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Frename-azure-resource-group%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Frename-azure-resource-group%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2026/07/featured_image-1.webp)

### [Microsoft Azure Certification Roadmap: Choose the Right Path](/azure-certification-roadmap-2/)

Choose the right Microsoft Azure certification for your career goals. Compare AZ-900, AZ-104, AZ-305, AZ-400, AZ-700, DP-700, study timelines, and 2026 retirements.

![](https://adamtheautomator.com/wp-content/uploads/2021/03/azure-cli.jpg)

### [Master Azure CLI: Command Your Cloud with Confidence](/azure-cli/)

Unlock the full potential of cloud management with the Azure CLI. This guide provides the essentials to get you started with Azure resources efficiently.

![](https://adamtheautomator.com/wp-content/uploads/2019/08/microsoft-graph.png)

### [Mastering PowerShell Graph API: Easy-to-Follow Insights](/powershell-graph-api/)

Master the PowerShell Graph API with our concise guide. Learn to access, read, and manage data effortlessly, enhancing your API skills quickly and efficiently.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
