---
title: Azure – You can now automatically upgrade the extension of your virtual machine (preview) - cubesys
description: As you know you can add extensions (small applications that provide post-deployment configuration and automation tasks) to your virtual machine running on Azure.Well, you can now get these extensions automatically upgrade when there is a new version.This is  a preview capability which means there is no SLA associated with it…
---

[Latest News & Blogs - cubesys ](https://www.cubesys.com.au/blog)

# [Azure – You can now automatically upgrade the extension of your virtual machine (preview) - cubesys](https://www.cubesys.com.au/blog/azure-you-can-now-automatically-upgrade-the-extension-of-your-virtual-machine-preview)

 Written by [cubesys](https://www.cubesys.com.au/blog/author/cubesys) | Feb 16, 2021 1:00:00 PM

As you know you can add extensions (small applications that provide post-deployment configuration and automation tasks) to your virtual machine running on Azure.

Well, you can now get these extensions automatically upgrade when there is a new version.

This is  a **preview capability** which means there is no SLA associated with it in case of trouble.

Automatic Extension Upgrade has the following features:

- Supported for Azure VMs and Azure Virtual Machine Scale Sets. Service Fabric Virtual Machine Scale Sets are currently not supported
- Upgrades are applied in an availability-first deployment model
- When applied to a Virtual Machine Scale Sets, no more than 20% of the Virtual Machine Scale Sets virtual machines will be upgraded in a single batch (subject to a minimum of one virtual machine per batch)
- Works for all VM sizes, and for both Windows and Linux extensions
- Automatic extension upgrade can be enabled on a Virtual Machine Scale Sets of any size
- Each supported extension is enrolled individually, and you can choose which extensions to upgrade automatically
- Supported in all public cloud regions

If, within 5 minutes after the extension has been upgraded, the virtual machine is seen unhealthy then the extension is automatically rolled back to the previous version.

Currently only 2 extensions support the automatic upgrade:

- Microsoft Dependency Agent
- Application Health

If you want to evaluate the capability, you need to run the below PowerShell commands (or Azure Cli equivalent)

- Register the required provider

> Register-AzProviderFeature -FeatureName AutomaticExtensionUpgradePreview -ProviderNamespace Microsoft.Compute

- After the registration is completed propagate the change

> Register-AzResourceProvider -ProviderNamespace Microsoft.Compute

Then you can enable the supported extensions using the Set-AzVMExtension for virtual machine or Add-AzVmssExtension for virtual machine scale set

> Set-AzVMExtension -ExtensionName “Microsoft.Azure.Monitoring.DependencyAgent” -ResourceGroupName “resource group of the VM” -VMName “VM name” -Publisher “Microsoft.Azure.Monitoring.DependencyAgent” -ExtensionType “DependencyAgentWindows” -TypeHandlerVersion 9.5 –Location <location of the VM> **-EnableAutomaticUpgrade $true**

> Add-AzVmssExtension –VirtualMachineScaleSet <VM scale set> -Name “Microsoft.Azure.Monitoring.DependencyAgent” -Publisher “Microsoft.Azure.Monitoring.DependencyAgent” -Type “DependencyAgentWindows” -TypeHandlerVersion 9.5 **-EnableAutomaticUpgrade $true**

[View full post](https://www.cubesys.com.au/blog/azure-you-can-now-automatically-upgrade-the-extension-of-your-virtual-machine-preview)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "cubesys"
  },
  "dateModified" : "2025-02-21T15:16:34.729Z",
  "datePublished" : "2021-02-16T13:00:00Z",
  "headline" : "Azure – You can now automatically upgrade the extension of your virtual machine (preview)",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://www.cubesys.com.au/blog/azure-you-can-now-automatically-upgrade-the-extension-of-your-virtual-machine-preview",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Latest News"
  }
}
```