Skip to content

Commit 74f83bf

Browse files
Merge pull request #195962 from stowen-msft/main
Create move-automanaged-configurationprofile.md
2 parents 9fcb70a + 3fd7757 commit 74f83bf

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

articles/automanage/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
href: repair-automanage-account.md
4141
- name: Move an Automanaged virtual machine across regions
4242
href: move-automanaged-vms.md
43+
- name: Move an Automanaged configuration profile across regions
44+
href: move-automanaged-configuration-profile.md
4345
- name: Windows Server VNext Datacenter Azure Edition (preview)
4446
href: windows-server-azure-edition-vnext.md
4547
- name: Resources
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: Move an Azure Automanage configuration profile across regions
3+
description: Learn how to move an Automanage Configuration Profile across regions
4+
ms.service: automanage
5+
ms.workload: infrastructure
6+
ms.topic: how-to
7+
ms.date: 05/01/2022
8+
ms.custom: subject-moving-resources
9+
# Customer intent: As a sysadmin, I want move my Automanage Configuration Profile to a different region.
10+
---
11+
12+
# Move an Azure Automanage configuration profile to a different region
13+
This article describes how to migrate an Automanage Configuration Profile to a different region. You might want to move your Configuration Profiles to another region for many reasons. For example, to take advantage of a new Azure region, to meet internal policy and governance requirements, or in response to capacity planning requirements. You may want to deploy Azure Automanage to some VMs that are in a new region. Some regions may require that you use Automanage Configuration Profiles that are local to that region.
14+
15+
## Prerequisites
16+
* Ensure that your target region is [supported by Automanage](./automanage-virtual-machines.md#prerequisites).
17+
* Ensure that your Log Analytics workspace region, Automation account region, and your target region are all regions supported by the region mappings [here](../automation/how-to/region-mappings.md).
18+
19+
## Download your desired Automanage configuration profile
20+
21+
We'll begin by downloading our previous Configuration Profile using PowerShell. First, perform a `GET` using `Invoke-RestMethod` against the Automanage Resource Provider, substituting the values for your subscription.
22+
23+
```url
24+
https://management.azure.com/subscriptions/<yourSubscription>/providers/Microsoft.Automanage/configurationProfiles?api-version=2021-04-30-preview
25+
```
26+
27+
The GET command will display a list of Automanage Configuration Profile information, including the settings and the ConfigurationProfile ID
28+
```azurepowershell-interactive
29+
$listConfigurationProfilesURI = "https://management.azure.com/subscriptions/<yourSubscription>/providers/Microsoft.Automanage/configurationProfiles?api-version=2021-04-30-preview"
30+
31+
Invoke-RestMethod `
32+
-URI $listConfigurationProfilesURI
33+
```
34+
35+
Here are the results, edited for brevity.
36+
37+
```json
38+
{
39+
"id": "/subscriptions/yourSubscription/resourceGroups/yourResourceGroup/providers/Microsoft.Automanage/configurationProfiles/testProfile1",
40+
"name": "testProfile1",
41+
"type": "Microsoft.Automanage/configurationProfiles",
42+
"location": "westus",
43+
"properties": {
44+
"configuration": {
45+
"Antimalware/Enable": false,
46+
"Backup/Enable": true,
47+
"Backup/PolicyName": "dailyBackupPolicy",
48+
}
49+
}
50+
},
51+
{
52+
"id": "/subscriptions/yourSubscription/resourceGroups/yourResourceGroup/providers/Microsoft.Automanage/configurationProfiles/testProfile2",
53+
"name": "testProfile2",
54+
"type": "Microsoft.Automanage/configurationProfiles",
55+
"location": "eastus2euap",
56+
"properties": {
57+
"configuration": {
58+
"Antimalware/Enable": false,
59+
"Backup/Enable": true,
60+
"Backup/PolicyName": "dailyBackupPolicy",
61+
}
62+
}
63+
}
64+
```
65+
66+
The next step is to do another `GET`, this time to retrieve the specific profile we would like to create in a new region. For this example, we'll retrieve 'testProfile1'. We'll perform a `GET` against the `id` value for the desired profile.
67+
68+
```azurepowershell-interactive
69+
$profileId = "https://management.azure.com/subscriptions/yourSubscription/resourceGroups/yourResourceGroup/providers/Microsoft.Automanage/configurationProfiles/testProfile1?api-version=2021-04-30-preview"
70+
71+
$profile = Invoke-RestMethod `
72+
-URI $listConfigurationProfilesURI
73+
```
74+
75+
## Adjusting the location
76+
77+
Creating the profile in a new location is as simple as changing the `Location` property to our desired Azure Region.
78+
79+
We also will need to create a new name for this profile. Let's change the name of the Configuration Profile `profileUk`. We should update the `Name` property within the profile, and also in the URL. We can use the `-replace` format operator to make this simple.
80+
81+
```powershell
82+
$profile.Location = "westeurope"
83+
$profile.Name -replace "testProfile1", "profileUk"
84+
$profileId -replace "testProfile1", "profileUk"
85+
```
86+
87+
Now that we have changed the Location value, this updated Configuration Profile will be created in Western Europe when we submit it.
88+
89+
## Creating the new profile in the desired location
90+
91+
All that remains now is to `PUT` this new profile, using `Invoke-RestMethod` once more.
92+
93+
```powershell
94+
$profile = Invoke-RestMethod `
95+
-Method PUT `
96+
-URI $profileId
97+
```
98+
99+
## Enable Automanage on your VMs
100+
For details on how to move your VMs, see this [article](../resource-mover/tutorial-move-region-virtual-machines.md).
101+
102+
Once you've moved your profile to a new region, you may use it as a custom profile for any VM. Details are available [here](./automanage-virtual-machines.md#enabling-automanage-for-vms-in-azure-portal).
103+
104+
## Next steps
105+
* [Learn more about Azure Automanage](./automanage-virtual-machines.md)
106+
* [View frequently asked questions about Azure Automanage](./faq.yml)

0 commit comments

Comments
 (0)