Skip to content

Commit 08f3dd6

Browse files
committed
updated steps in remove VM article
1 parent c9474e2 commit 08f3dd6

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

articles/automation/update-management/remove-vms.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,41 @@
11
---
2-
title: Remove VMs from Azure Automation Update Management
3-
description: This article tells how to remove machines managed with Update Management.
2+
title: Remove machines from Azure Automation Update Management
3+
description: This article tells how to remove Azure and non-Azure machines managed with Update Management.
44
services: automation
55
ms.topic: conceptual
6-
ms.date: 06/03/2021
6+
ms.date: 10/20/2021
77
ms.custom: mvc
88
---
99
# Remove VMs from Update Management
1010

11-
When you're finished managing updates on your VMs in your environment, you can stop managing VMs with the [Update Management](overview.md) feature. To stop managing them, you will edit the saved search query `MicrosoftDefaultComputerGroup` in your Log Analytics workspace that is linked to your Automation account.
11+
When you're finished managing updates on your Azure or non-Azure machines in your environment, you can stop managing them with the [Update Management](overview.md) feature. To stop managing them, you will edit the saved search query `MicrosoftDefaultComputerGroup` in your Log Analytics workspace that is linked to your Automation account.
1212

1313
## Sign into the Azure portal
1414

1515
Sign in to the [Azure portal](https://portal.azure.com).
1616

17-
## To remove your VMs
17+
## To remove your machines
1818

1919
1. In the Azure portal, launch **Cloud Shell** from the top navigation of the Azure portal. If you are unfamiliar with Azure Cloud Shell, see [Overview of Azure Cloud Shell](../../cloud-shell/overview.md).
2020

21-
2. Use the following command to identify the UUID of a machine that you want to remove from management.
21+
2. Use the following command to identify the UUID of an Azure virtual machine or non-Azure machine that you want to remove from management.
2222

23-
```azurecli
24-
az vm show -g MyResourceGroup -n MyVm -d
25-
```
23+
# [Azure VM](#tab/azure-vm)
24+
25+
```azurecli
26+
az vm show -g MyResourceGroup -n MyVm -d
27+
```
28+
29+
# [Non-Azure machine](#tab/non-azure-machine)
30+
31+
```kusto
32+
Heartbeat
33+
| where TimeGenerated > ago(30d)
34+
| where ResourceType == "machines" and (ComputerEnvironment == "Non-Azure")
35+
| summarize by Computer, VMUUIDContent for Windows...
36+
```
37+
38+
---
2639

2740
3. In the Azure portal, navigate to **Log Analytics workspaces**. Select your workspace from the list.
2841

@@ -32,7 +45,7 @@ Sign in to the [Azure portal](https://portal.azure.com).
3245

3346
6. From the table, click the icon **Run query** to the right of the item **MicrosoftDefaultComputerGroup** with the **Legacy category** value **Updates**.
3447

35-
7. In the query editor, review the query and find the UUID for the VM. Remove the UUID for the VM and repeat the steps for any other VMs you want to remove.
48+
7. In the query editor, review the query and find the UUID for the machine. Remove the UUID for the machine and repeat the steps for any other machines you want to remove.
3649

3750
> [!NOTE]
3851
> For added protection, before making edits be sure to make a copy of the query. Then you can restore it if a problem occurs.
@@ -56,4 +69,4 @@ Sign in to the [Azure portal](https://portal.azure.com).
5669
5770
## Next steps
5871

59-
To re-enable managing your virtual machine, see [Enable Update Management by browsing the Azure portal](enable-from-portal.md) or [Enable Update Management from an Azure VM](enable-from-vm.md).
72+
To re-enable managing your Azure or non-Azure machine, see [Enable Update Management by browsing the Azure portal](enable-from-portal.md) or [Enable Update Management from an Azure VM](enable-from-vm.md).

0 commit comments

Comments
 (0)