|
| 1 | +--- |
| 2 | +title: Enable Change Tracking and Inventory at Scale with Azure Policy |
| 3 | +description: Learn how to use Azure Policy to enable change tracking and inventory at scale for Windows and Linux VMs, including Arc-enabled VMs and VM Scale Sets. |
| 4 | +services: automation |
| 5 | +ms.subservice: change-inventory-management |
| 6 | +ms.date: 03/31/2025 |
| 7 | +ms.topic: how-to |
| 8 | +ms.service: azure-automation |
| 9 | +--- |
| 10 | + |
| 11 | +# Enable Change Tracking at scale using policy |
| 12 | + |
| 13 | +**Applies to:** :heavy_check_mark: Windows VMs :heavy_check_mark: Linux VMs :heavy_check_mark: Windows Registry :heavy_check_mark: Windows Files :heavy_check_mark: Linux Files :heavy_check_mark: Windows Software |
| 14 | + |
| 15 | +This article provides detailed procedure on how you can enable change tracking and inventory at scale using policy. |
| 16 | + |
| 17 | +## Prerequisite |
| 18 | + |
| 19 | +- You must [create the Data collection rule](enable-vms-monitoring-agent.md#create-data-collection-rule). |
| 20 | + |
| 21 | +## Enable Change tracking |
| 22 | + |
| 23 | +Using the Deploy if not exist (DINE) policy, you can enable Change tracking with Azure Monitoring Agent at scale and in the most efficient manner. |
| 24 | + |
| 25 | +1. In Azure portal, select **Policy**. |
| 26 | +1. In the **Policy** page, under **Authoring**, select **Definitions** |
| 27 | +1. In **Policy | Definitions** page, under the **Definition Type** category, select **Initiative** and in **Category**, select **Change Tracking and Inventory**. You'll see a list of three policies: |
| 28 | + |
| 29 | + #### [Arc-enabled virtual machines](#tab/arcvm) |
| 30 | + |
| 31 | + - Select *Enable Change Tracking and Inventory for Arc-enabled virtual machines*. |
| 32 | + |
| 33 | + :::image type="content" source="media/enable-vms-monitoring-agent/enable-for-arc-virtual-machine-manager-inline.png" alt-text="Screenshot showing the selection of Arc-enabled virtual machines." lightbox="media/enable-vms-monitoring-agent/enable-for-arc-virtual-machine-manager-expanded.png"::: |
| 34 | + |
| 35 | + #### [Virtual machines Scale Sets](#tab/vmss) |
| 36 | + |
| 37 | + - Select *Enable Change Tracking and inventory for Virtual Machine Scale Sets*. |
| 38 | + |
| 39 | + :::image type="content" source="media/enable-vms-monitoring-agent/enable-for-virtual-machine-scale-set-inline.png" alt-text="Screenshot showing the selection of virtual machines scale sets." lightbox="media/enable-vms-monitoring-agent/enable-for-virtual-machine-scale-set-expanded.png"::: |
| 40 | + |
| 41 | + #### [Virtual machines](#tab/vm) |
| 42 | + |
| 43 | + - Select *Enable Change Tracking and inventory for virtual machines*. |
| 44 | + |
| 45 | + :::image type="content" source="media/enable-vms-monitoring-agent/enable-for-vm-inline.png" alt-text="Screenshot showing the selection of virtual machines." lightbox="media/enable-vms-monitoring-agent/enable-for-vm-expanded.png"::: |
| 46 | + |
| 47 | + |
| 48 | +1. Select *Enable Change Tracking and Inventory for virtual machines* to enable the change tracking on Azure virtual machines. |
| 49 | + This initiative consists of three policies: |
| 50 | + |
| 51 | + - Assign Built in User-Assigned Managed identity to Virtual machines |
| 52 | + - Configure ChangeTracking Extension for Windows virtual machines |
| 53 | + - Configure ChangeTracking Extension for Linux virtual machines |
| 54 | + |
| 55 | + :::image type="content" source="media/enable-vms-monitoring-agent/enable-change-tracking-virtual-machines-inline.png" alt-text="Screenshot showing the selection of three policies." lightbox="media/enable-vms-monitoring-agent/enable-change-tracking-virtual-machines-expanded.png"::: |
| 56 | + |
| 57 | +1. Select **Assign** to assign the policy to a resource group. For example, *Assign Built in User-Assigned Managed identity to virtual machines*. |
| 58 | + |
| 59 | + > [!NOTE] |
| 60 | + > The Resource group contains virtual machines and when you assign the policy, it will enable change tracking at scale to a resource group. The virtual machines that are on-boarded to the same resource group will automatically have the change tracking feature enabled. |
| 61 | +
|
| 62 | +1. In the **Enable Change Tracking and Inventory for virtual machines** page, enter the following options: |
| 63 | + 1. In **Basics**, you can define the scope. Select the three dots to configure a scope. In the **Scope** page, provide the **Subscription** and **Resource group**. |
| 64 | + 1. In **Parameters**, select the option in the **Bring your own user assigned managed identity**. |
| 65 | + 1. Provide the **Data Collection Rule Resource id**. Learn more on [how to obtain the Data Collection Rule Resource ID after you create the Data collection rule](#create-data-collection-rule). |
| 66 | + 1. Select **Review + create**. |
| 67 | + |
| 68 | +## Next steps |
| 69 | + |
| 70 | +* To learn about alerts, see [Configuring alerts](../change-tracking/configure-alerts.md). |
0 commit comments