|
| 1 | +--- |
| 2 | +title: Enable cross-subscription patching in Azure Update Manager |
| 3 | +description: Learn how to enable cross-subscription patching in Azure Update Manager. |
| 4 | +ms.service: azure-update-manager |
| 5 | +author: SnehaSudhirG |
| 6 | +ms.author: sudhirsneha |
| 7 | +ms.date: 08/22/2024 |
| 8 | +ms.topic: how-to |
| 9 | +--- |
| 10 | + |
| 11 | +# Enable cross subscription patching in Azure Update Manager |
| 12 | + |
| 13 | +**Applies to:** :heavy_check_mark: Windows VMs :heavy_check_mark: Linux VMs :heavy_check_mark: On-premises environment :heavy_check_mark: Azure Arc-enabled servers. |
| 14 | + |
| 15 | +This article describes how to enable cross-subscription patching either through Azure CLI or portal. |
| 16 | + |
| 17 | +## Enable resource providers in subscription |
| 18 | + |
| 19 | +1. Register the necessary resource providers to your subscription either through Azure CLI or manually via the Azure portal |
| 20 | + |
| 21 | + # [Using Azure CLI](#tab/az-cli) |
| 22 | + |
| 23 | + Open your Azure CLI and enter the following commands: |
| 24 | + |
| 25 | + az provider register --namespace "Microsoft.Insights" |
| 26 | + az provider register --namespace "Microsoft.Maintenance" |
| 27 | + |
| 28 | + # [Using Azure portal](#tab/az-portal) |
| 29 | + |
| 30 | + 1. Sign in to the [Azure portal](https://portal.azure.com) and go to your subscription. |
| 31 | + 1. Under **Settings**, select **Resource providers**. |
| 32 | + 1. Activate both **Microsoft.Insights** and **Microsoft.Maintenance**. |
| 33 | + |
| 34 | + :::image type="content" source="./media/enable-cross-subscription-patching/select-resource-providers.png" alt-text="Screenshot that shows how to select the resource providers from subscription." lightbox="./media/enable-cross-subscription-patching/select-resource-providers.png"::: |
| 35 | + |
| 36 | +--- |
| 37 | +2. Grant necessary roles to your managed identity |
| 38 | + |
| 39 | + - Assign the appropriate roles to your Azure VM and Arc assets to ensure scheduled patching can be managed effectively. The required roles are: |
| 40 | + - Scheduled patching contributor |
| 41 | + - Reader |
| 42 | + - These roles can be granted on the Resource Group or Subscription level if you have resources spread amongst multiple resource groups and want to include them all at once. |
| 43 | + - If you have a smaller scope and plan to manage it with a dedicated admin or group, these two roles can be granted to an user or a security group (SG). If you are envisioning a larger scope with automation in place, grant these roles to the API and Service Principal Name (SPN) you use. |
| 44 | + |
| 45 | +3. Scheduling |
| 46 | + |
| 47 | + There are two methods for schedule patching. |
| 48 | + |
| 49 | + # [Using Azure portal](#tab/az-patch-portal) |
| 50 | + |
| 51 | + 1. Sign in to the [Azure portal](https://portal.azure.com) and go to **Azure Update Manager**. |
| 52 | + 1. Under **Resources**, select **Machines**, and then select **Maintenance configurations**. |
| 53 | + 1. In the **Maintenance Configurations** page, follow the steps to [set up the patching schedule](scheduled-patching.md#schedule-recurring-updates-on-a-single-vm). |
| 54 | + |
| 55 | + # [Using API](#tab/az-patch-cli) |
| 56 | + |
| 57 | + - Use the API to programmatically schedule the patching. |
| 58 | + - For schedule patching on VM or Arc assets, locate the assets by using the *resourceId* and *subscription* that they are attached to. |
| 59 | + |
| 60 | +--- |
| 61 | +## Next steps |
| 62 | + |
| 63 | +* Overview on [cross-subscription patching](cross-subscription-patching.md) |
| 64 | +* [Schedule recurring updates](scheduled-patching.md) |
| 65 | +* [Manage update settings via portal](manage-update-settings.md) |
| 66 | +* [Manage multiple machines using Update Manager](manage-multiple-machines.md) |
0 commit comments