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
Copy file name to clipboardExpand all lines: articles/azure-monitor/agents/azure-monitor-agent-mma-removal-tool.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,24 +11,24 @@ ms.custom:
11
11
---
12
12
# MMA/OMS Discovery and Removal Utility
13
13
14
-
After you migrate your machines to the Azure Monitor Agent (AMA), remove the legacy Log Analytics Agent, MMA or OMS depending on your operating systems, to avoid duplication of logs. The legacy Discovery and Removal Utility can remove the extensions from Azure Virtual Machines (VMs), Azure Virtual Machine Scale Sets, and Azure Arc servers from a single subscription.
14
+
After you migrate your machines to the Azure Monitor Agent (AMA), remove the legacy Log Analytics Agent, MMA, or OMS depending on your operating systems, to avoid duplication of logs. The legacy Discovery and Removal Utility can remove the extensions from Azure Virtual Machines (VMs), Azure Virtual Machine Scale Sets (VMSSs), and Azure Arc servers from a single subscription.
15
15
16
16
The utility works in two steps:
17
17
18
-
1.*Discovery*: The utility creates an inventory of all machines that have a legacy agent installed in a simple CSV file. We recommend that you don't create any new VMs, virtual machine scale sets, or Azure Arc servers with the legacy agent extension while the utility is running.
18
+
1.*Discovery*: The utility creates an inventory of all machines that have a legacy agent installed in a simple CSV file. We recommend that you don't create any new VMs while the utility is running.
19
19
20
20
2.*Removal*: The utility removes the legacy agent from machines listed in the CSV file. You should edit the list of machine in the CSV file to ensure that only machines you want the agent removed from are present.
21
21
22
22
## Prerequisites
23
23
Do all the setup steps on an Internet connected machine. You need:
24
24
25
25
- Windows 10 or later, or Windows Server 2019 or later.
26
-
-[PowerShell 7.0 or later.](/powershell/scripting/install/installing-powershell?view=powershell-7.4&preserve-view=true) This allows for parallel execution that speeds the process up.
26
+
-[PowerShell 7.0 or later.](/powershell/scripting/install/installing-powershell?view=powershell-7.4&preserve-view=true), which enables parallel execution that speeds the process up.
27
27
- Azcli must be installed to communicate with the [Azure Graph API.](/cli/azure/install-azure-cli-windows?tabs=azure-cli).
28
28
1. Open PowerShell as administrator:
29
29
2. Run the command: `Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile AzureCLI.msi`.
30
30
3. Run the command: `Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'`.
31
-
4. The latest version of Azure CLI will be downloaded and installed.
31
+
4. The latest version of Azure CLI will download and install.
32
32
- A [user-assigned managed identity](/azure/active-directory/managed-identities-azure-resources/overview) that has**User Access Administrator**, **Reader**, **Virtual Machine Contributor**, and **Azure Arc ScVmm VM Contributor** access on the target scopes.
33
33
34
34
@@ -44,9 +44,10 @@ Next you must set your subscription.
44
44
Az account set --subscription {subscription_id or “subscription_name”}
45
45
```
46
46
## Step 2 Copy the script
47
+
47
48
You'll use the following script for agent removal. Open a file in your local directory named MMAUnistallUtilityScript.ps1 and copy the script into the file.
48
49
```PowerShell
49
-
# This is per subscription, the customer has to set the az subscription before running this.
50
+
# This is per subscription, the customer has to set the az subscription before running this.
50
51
# az login
51
52
# az account set --subscription <subscription_id/subscription_name>
52
53
# This script uses parallel processing, modify the $parallelThrottleLimit parameter to either increase or decrease the number of parallel processes
@@ -234,11 +235,11 @@ switch ($args.Count)
234
235
```
235
236
236
237
## Step 3 Get inventory
237
-
You must collect a list of all legacy agents, both MMA and OMS, on all VM, Virtual Machine Scale Sets, and Arc enabled server in the subscription. Run the script you downloaded to your file to product and inventory of legacy agents in your subscription.
238
+
You'll collect a list of all legacy agents, both MMA and OMS, on all VM, VMSSs and Arc enabled server in the subscription. You'll run the script you downloaded an inventory of legacy agents in your subscription.
238
239
```PowerShell
239
240
.\MMAUnistallUtilityScript.ps1 GetInventory
240
241
```
241
-
The script will report the total VM, Virtual Machine Scale Sets, or Arc enables servers seen in the subscription. It will take several minutes to run. You'll see a progress bar in the console window. Once complete there will be a CSV file called MMAInventory.csv in the local directory with the following format.
242
+
The script reports the total VM, VMSSs, or Arc enables servers seen in the subscription. It takes several minutes to run. You see a progress bar in the console window. Once complete, you are able to see a CSV file called MMAInventory.csv in the local directory with the following format.
242
243
243
244
|Resource_Group | Resource_Type | Name | Install_Type |Extension_Name |
0 commit comments