Skip to content

Commit 045cc55

Browse files
committed
update
1 parent 427dded commit 045cc55

File tree

1 file changed

+67
-67
lines changed

1 file changed

+67
-67
lines changed

articles/azure-resource-manager/management/move-resource-group-and-subscription.md

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -36,94 +36,94 @@ Some important steps precede moving a resource. You can avoid errors if you veri
3636

3737
1. The source and destination subscriptions must exist within the same [Microsoft Entra tenant](../../active-directory/develop/quickstart-create-new-tenant.md). Use the Azure CLI or PowerShell to check that both subscriptions have the same tenant ID.
3838

39-
# [Azure CLI](#tab/azure-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
44-
```
45-
46-
# [Azure PowerShell](#tab/azure-powershell)
47-
48-
```azurepowershell-interactive
49-
(Get-AzSubscription -SubscriptionName <your-source-subscription>).TenantId
50-
(Get-AzSubscription -SubscriptionName <your-destination-subscription>).TenantId
51-
```
52-
53-
---
54-
55-
If the tenant IDs for the source and destination subscriptions don't match, use the following methods to reconcile them:
56-
57-
- [Transfer billing ownership of an Azure subscription](../../cost-management-billing/manage/billing-subscription-transfer.md#transfer-billing-ownership-of-an-azure-subscription).
58-
- [Associate or add an Azure subscription to your Microsoft Entra tenant](../../active-directory/fundamentals/active-directory-how-subscriptions-associated-directory.md).
39+
# [Azure CLI](#tab/azure-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
44+
```
45+
46+
# [Azure PowerShell](#tab/azure-powershell)
47+
48+
```azurepowershell-interactive
49+
(Get-AzSubscription -SubscriptionName <your-source-subscription>).TenantId
50+
(Get-AzSubscription -SubscriptionName <your-destination-subscription>).TenantId
51+
```
52+
53+
---
54+
55+
If the tenant IDs for the source and destination subscriptions don't match, use the following methods to reconcile them:
56+
57+
- [Transfer billing ownership of an Azure subscription](../../cost-management-billing/manage/billing-subscription-transfer.md#transfer-billing-ownership-of-an-azure-subscription).
58+
- [Associate or add an Azure subscription to your Microsoft Entra tenant](../../active-directory/fundamentals/active-directory-how-subscriptions-associated-directory.md).
5959
6060
1. 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).
6161
6262
1. The resources you want to move must support the move operation. For a list of which resources support move operations, see [Azure resource types for move operations](move-support-resources.md).
6363
6464
1. Some services have specific limitations or requirements when moving resources. Check the following move guidance before moving resources within these services:
6565
66-
- If you're using Azure Stack Hub, you can't move resources between groups.
67-
68-
- [Azure App Services](./move-limitations/app-service-move-limitations.md)
69-
- [Azure DevOps Services](/azure/devops/organizations/billing/change-azure-subscription?toc=/azure/azure-resource-manager/toc.json)
70-
- [Classic deployment model](./move-limitations/classic-model-move-limitations.md) for classic compute, storage, virtual networks, and cloud services
71-
- [Cloud Services (extended support)](./move-limitations/classic-model-move-limitations.md)
72-
- [Networking](./move-limitations/networking-move-limitations.md)
73-
- [Azure Recovery Services](../../backup/backup-azure-move-recovery-services-vault.md?toc=/azure/azure-resource-manager/toc.json)
74-
- [Virtual machines](./move-limitations/virtual-machines-move-limitations.md)
75-
- 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.
67+
68+
- [Azure App Services](./move-limitations/app-service-move-limitations.md)
69+
- [Azure DevOps Services](/azure/devops/organizations/billing/change-azure-subscription?toc=/azure/azure-resource-manager/toc.json)
70+
- [Classic deployment model](./move-limitations/classic-model-move-limitations.md) for classic compute, storage, virtual networks, and cloud services
71+
- [Cloud Services (extended support)](./move-limitations/classic-model-move-limitations.md)
72+
- [Networking](./move-limitations/networking-move-limitations.md)
73+
- [Azure Recovery Services](../../backup/backup-azure-move-recovery-services-vault.md?toc=/azure/azure-resource-manager/toc.json)
74+
- [Virtual machines](./move-limitations/virtual-machines-move-limitations.md)
75+
- To move an Azure subscription to a new management group, see [Move subscriptions](../../governance/management-groups/manage.md#move-management-groups-and-subscriptions).
7676
7777
1. The destination subscription must be registered for the resource provider of the resource you're moving. If it's not, you receive an error stating that the **subscription isn't registered for a resource type**. You might see this error when moving a resource to a new subscription, but you didn't previously use the resource type in the subscription.
7878
79-
# [Azure CLI](#tab/azure-cli)
80-
81-
To get the registration status:
82-
83-
```azurecli-interactive
84-
az account set -s <destination-subscription-name-or-id>
85-
az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table
86-
```
87-
88-
To register a resource provider:
89-
90-
```azurecli-interactive
91-
az provider register --namespace Microsoft.Batch
92-
```
93-
94-
# [Azure PowerShell](#tab/azure-powershell)
95-
96-
To get the registration status:
97-
98-
```azurepowershell-interactive
99-
Set-AzContext -Subscription <destination-subscription-name-or-id>
100-
Get-AzResourceProvider -ListAvailable | Select-Object ProviderNamespace, RegistrationState
101-
```
102-
103-
To register a resource provider:
104-
105-
```azurepowershell-interactive
106-
Register-AzResourceProvider -ProviderNamespace Microsoft.Batch
107-
```
108-
109-
---
79+
# [Azure CLI](#tab/azure-cli)
80+
81+
To get the registration status:
82+
83+
```azurecli-interactive
84+
az account set -s <destination-subscription-name-or-id>
85+
az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table
86+
```
87+
88+
To register a resource provider:
89+
90+
```azurecli-interactive
91+
az provider register --namespace Microsoft.Batch
92+
```
93+
94+
# [Azure PowerShell](#tab/azure-powershell)
95+
96+
To get the registration status:
97+
98+
```azurepowershell-interactive
99+
Set-AzContext -Subscription <destination-subscription-name-or-id>
100+
Get-AzResourceProvider -ListAvailable | Select-Object ProviderNamespace, RegistrationState
101+
```
102+
103+
To register a resource provider:
104+
105+
```azurepowershell-interactive
106+
Register-AzResourceProvider -ProviderNamespace Microsoft.Batch
107+
```
108+
109+
---
110110
111111
1. Before starting a move operation, check the subscription quota for the subscription to which you're moving resources. Verify if you can request an increase in a quota that would cause a destination subscription to exceed its limit. For detailed guidance about 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).
112112
113113
1. The account moving the resources must have at least the following permissions:
114114
115-
- At the source resource group: **Microsoft.Resources/subscriptions/resourceGroups/moveResources/action**
116-
- At the destination resource group: **Microsoft.Resources/subscriptions/resourceGroups/write**
115+
- At the source resource group: **Microsoft.Resources/subscriptions/resourceGroups/moveResources/action**
116+
- At the destination resource group: **Microsoft.Resources/subscriptions/resourceGroups/write**
117117
118118
1. If you move a resource with an active Azure role assignment (or its child resource with this same assignment), the role assignment doesn't move and becomes orphaned. You must create the role assignment again after the move. Although the system automatically removes the orphaned role assignment, we recommend that you remove it before the move.
119119
120-
To learn more 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).
120+
To learn more 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).
121121
122122
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 virtual machine with managed disks requires you to move the virtual machine, managed disks, and other dependent resources together.
123123
124-
If you're moving a resource to a new subscription, check if the resource has any dependent resources and if they're located in the same resource group. If the resources aren't in the same resource group, check if you can combine them into the same resource group. If you can, use one move operation across resource groups to consolidate all the resources into the same resource group.
125-
126-
For more information, see [Scenario for move across subscriptions](#scenario-for-moving-across-subscriptions).
124+
If you're moving a resource to a new subscription, check if the resource has any dependent resources and if they're located in the same resource group. If the resources aren't in the same resource group, check if you can combine them into the same resource group. If you can, use one move operation across resource groups to consolidate all the resources into the same resource group.
125+
126+
For more information, see [Scenario for move across subscriptions](#scenario-for-moving-across-subscriptions).
127127
128128
## Scenario for moving across subscriptions
129129

0 commit comments

Comments
 (0)