You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -36,85 +36,93 @@ There are some important steps to do before moving a resource. By verifying thes
36
36
37
37
1. The source and destination subscriptions must exist within the same [Microsoft Entra tenant](../../active-directory/develop/quickstart-create-new-tenant.md). To check that both subscriptions have the same tenant ID, use Azure PowerShell or Azure CLI.
38
38
39
-
For Azure PowerShell, use:
39
+
# [CLI](#tab/CLI)
40
+
41
+
```azurecli-interactive
42
+
az account show --subscription <your-source-subscription> --query tenantId
43
+
az account show --subscription <your-destination-subscription> --query tenantId
If the tenant IDs for the source and destination subscriptions aren't the same, use the following methods to reconcile the tenant IDs:
47
56
48
-
```azurecli-interactive
49
-
az account show --subscription <your-source-subscription> --query tenantId
50
-
az account show --subscription <your-destination-subscription> --query tenantId
51
-
```
52
-
53
-
If the tenant IDs for the source and destination subscriptions aren't the same, use the following methods to reconcile the tenant IDs:
54
-
55
-
*[Transfer ownership of an Azure subscription to another account](../../cost-management-billing/manage/billing-subscription-transfer.md)
56
-
*[How to associate or add an Azure subscription to Microsoft Entra ID](../../active-directory/fundamentals/active-directory-how-subscriptions-associated-directory.md)
57
+
*[Transfer ownership of an Azure subscription to another account](../../cost-management-billing/manage/billing-subscription-transfer.md)
58
+
*[How to associate or add an Azure subscription to Microsoft Entra ID](../../active-directory/fundamentals/active-directory-how-subscriptions-associated-directory.md)
57
59
58
60
1. If you're attempting to move resources to or from a Cloud Solution Provider (CSP) partner, see [Transfer Azure subscriptions between subscribers and CSPs](../../cost-management-billing/manage/transfer-subscriptions-subscribers-csp.yml).
59
61
60
62
1. The resources you want to move must support the move operation. For a list of which resources support move, see [Move operation support for resources](move-support-resources.md).
61
63
62
64
1. Some services have specific limitations or requirements when moving resources. If you're moving any of the following services, check that guidance before moving.
63
65
64
-
* If you're using Azure Stack Hub, you can't move resources between groups.
* To move an Azure subscription to a new management group, see [Move subscriptions](../../governance/management-groups/manage.md#move-management-groups-and-subscriptions).
66
+
* If you're using Azure Stack Hub, you can't move resources between groups.
* To move an Azure subscription to a new management group, see [Move subscriptions](../../governance/management-groups/manage.md#move-management-groups-and-subscriptions).
73
75
74
76
1. The destination subscription must be registered for the resource provider of the resource being moved. If not, you receive an error stating that the **subscription is not registered for a resource type**. You might see this error when moving a resource to a new subscription, but that subscription has never been used with that resource type.
75
77
76
-
For PowerShell, use the following commands to get the registration status:
1. Before moving the resources, check the subscription quotas for the subscription you're moving the resources to. If moving the resources means the subscription exceeds its limits, you need to review whether you can request an increase in the quota. For a list of limits and how to request an increase, see [Azure subscription and service limits, quotas, and constraints](../../azure-resource-manager/management/azure-subscription-service-limits.md).
103
111
104
112
1. The account moving the resources must have at least the following permissions:
105
113
106
-
***Microsoft.Resources/subscriptions/resourceGroups/moveResources/action** on the source resource group.
107
-
***Microsoft.Resources/subscriptions/resourceGroups/write** on the destination resource group.
114
+
***Microsoft.Resources/subscriptions/resourceGroups/moveResources/action** on the source resource group.
115
+
***Microsoft.Resources/subscriptions/resourceGroups/write** on the destination resource group.
108
116
109
117
1. If you move a resource that has an Azure role assigned directly to the resource (or a child resource), the role assignment isn't moved and becomes orphaned. After the move, you must re-create the role assignment. Eventually, the orphaned role assignment is automatically removed, but we recommend removing the role assignment before the move.
110
118
111
-
For information about how to manage role assignments, see [List Azure role assignments](../../role-based-access-control/role-assignments-list-portal.yml#list-role-assignments-at-a-scope) and [Assign Azure roles](../../role-based-access-control/role-assignments-portal.yml).
119
+
For information about how to manage role assignments, see [List Azure role assignments](../../role-based-access-control/role-assignments-list-portal.yml#list-role-assignments-at-a-scope) and [Assign Azure roles](../../role-based-access-control/role-assignments-portal.yml).
112
120
113
121
1.**For a move across subscriptions, the resource and its dependent resources must be located in the same resource group and they must be moved together.** For example, a VM with managed disks would require the VM and the managed disks to be moved together, along with other dependent resources.
114
122
115
-
If you're moving a resource to a new subscription, check to see whether the resource has any dependent resources, and whether they're located in the same resource group. If the resources aren't in the same resource group, check to see whether the resources can be combined into the same resource group. If so, bring all these resources into the same resource group by using a move operation across resource groups.
123
+
If you're moving a resource to a new subscription, check to see whether the resource has any dependent resources, and whether they're located in the same resource group. If the resources aren't in the same resource group, check to see whether the resources can be combined into the same resource group. If so, bring all these resources into the same resource group by using a move operation across resource groups.
116
124
117
-
For more information, see [Scenario for move across subscriptions](#scenario-for-move-across-subscriptions).
125
+
For more information, see [Scenario for move across subscriptions](#scenario-for-move-across-subscriptions).
118
126
119
127
## Scenario for move across subscriptions
120
128
@@ -168,50 +176,6 @@ When the move has completed, you're notified of the result.
168
176
169
177
:::image type="content" source="./media/move-resource-group-and-subscription/view-notification.png" alt-text="Screenshot of the Azure portal displaying a notification with the results of the move operation.":::
170
178
171
-
### Use Azure PowerShell
172
-
173
-
#### Validate
174
-
175
-
To test your move scenario without actually moving the resources, use the [Invoke-AzResourceAction](/powershell/module/az.resources/invoke-azresourceaction) command. Use this command only when you need to predetermine the results.
If validation fails, you see an error message describing why the resources can't be moved.
198
-
199
-
#### Move
200
-
201
-
To move existing resources to another resource group or subscription, use the [Move-AzResource](/powershell/module/az.resources/move-azresource) command. The following example shows how to move several resources to a new resource group.
To move to a new subscription, provide the `--destination-subscription-id` parameter.
262
226
227
+
### Use Azure PowerShell
228
+
229
+
#### Validate
230
+
231
+
To test your move scenario without actually moving the resources, use the [Invoke-AzResourceAction](/powershell/module/az.resources/invoke-azresourceaction) command. Use this command only when you need to predetermine the results.
If the validation is successful, no output is displayed. However, if the validation fails, an error message will appear, explaining the reasons why the resources cannot be moved.
252
+
253
+
#### Move
254
+
255
+
To move existing resources to another resource group or subscription, use the [Move-AzResource](/powershell/module/az.resources/move-azresource) command. The following example shows how to move several resources to a new resource group.
If validation fails, you see an error message describing why the resources can't be moved.
309
+
If the validation is successful, no output is displayed. However, if the validation fails, an error message will appear, explaining the reasons why the resources cannot be moved.
0 commit comments