# Upgrading Agents (Azure Virtual Desktop)

You can enable and configure automatic updates for all Azure Virtual Desktop hosts in a host pool.&#x20;

## Schedule Agent auto-upgrade&#x20;

To schedule Agent auto-upgrade:

1. Go to the **Farm > Site > Azure Virtual Desktop** **> Host pools > Properties > Auto-upgrade** tab.
2. Clear the **Inherit default settings** options if you want to modify them for this host pool.
3. Select the **Enable auto-upgrade maintenance window** option. During the maintenance window, all hosts in the host pool will try to download Agent upgrades. The upgrades will be downloaded and installed as soon as all users log out of their hosts. New logons from users are prohibited (drain mode).  If the users don't log off during a maintenance window, the upgrades won't be installed until the next window.
4. Specify the start date and time, duration, and recurrence settings for this event. To make this a one-time event, select **Never** in the **Recur** drop-down list.
5. (Optional) If you want to forcefully log off all users and download the upgrades at the end of a maintenance window, select the **Force logoff of current sessions at the end of the maintenance window duration** option.
6. (Optional) Configure a message that will be sent to users before or during a maintenance window. Click the **Configure messages** button and specify the message title, body, and the time period when it should be sent.

## Cancel Agent auto-update

To cancel Agent auto-update:

1. Go to **Farm > Site > Azure Virtual Desktop > Host pools.**
2. Select **Tasks > Cancel auto-upgrade maintenance window.**
