Kaido Jarvemets - Logo

How to Roll Back the Latest Version of Azure Monitoring Agent on Azure Arc for Servers

Introduction

If you’ve encountered issues with the latest version of the Azure Monitoring Agent on your Azure Arc for Servers machine, you can roll back to an older version using PowerShell. This guide will walk you through the steps to remove the latest version of the extension and install an older version.

Important Note

Automatic upgrade is enabled by default for Azure Monitoring Agent. 

Upgrades are available for one or more of your extensions. If you have Auto upgrade enabled, patches can take 30-60 days to complete for non-security related changes. Not fast enough? Upgrade manually today. Click here to learn more.

Steps to Remove and Reinstall Azure Monitoring Agent

Prerequisites

  • Ensure you have the necessary permissions to manage extensions on your Azure Arc for Servers machine.
  • PowerShell module Az.ConnectedMachine should be installed and imported.

Step 1: Remove the Latest Version of the Extension

Run the following PowerShell command to remove the latest version of the Azure Monitoring Agent:

				
					$RemoveAMAParams = @{
    MachineName        = "MYSERVER1"
    ResourceGroupName  = "<MYRESOURCEGROUP>"
    Name               = "AzureMonitorWindowsAgent"
    SubscriptionId     = "<MYSUBSCRIPTIONID>"
}

Remove-AzConnectedMachineExtension @RemoveAMAParams
				
			

Step 2: Install the Older Version of the Extension

Run the following PowerShell command to install an older version of the Azure Monitoring Agent:

				
					$AMAParams = @{
    MachineName         = "MYSERVER1"
    ResourceGroupName   = "<MYRESOURCEGROUP>"
    Name                = "AzureMonitorWindowsAgent"
    SubscriptionId      = "<MYSUBSCRIPTIONID>"
    Publisher           = "Microsoft.Azure.Monitor"
    Location            = "West Europe"
    TypeHandlerVersion  = "1.24"
    ExtensionType       = "AzureMonitorWindowsAgent"
}

New-AzConnectedMachineExtension @AMAParams
				
			

Checking the Change History

To keep track of changes and updates to the Azure Monitoring Agent, you can refer to the Azure Monitor Agent Extension Versions documentation. This resource provides detailed information about each version’s release notes and updates.

Conclusion

By following these steps, you can easily roll back to a previous version of the Azure Monitoring Agent if you encounter issues with the latest version. Remember to monitor the extension’s performance and ensure it meets your requirements. If you need further assistance, refer to the Azure documentation.

Leave a Reply

Contact me

If you’re interested in learning about How to Roll Back the Latest Version of Azure Monitoring Agent on Azure Arc for Servers. I can help you understand how this solution can benefit your organization and provide a customized solution tailored to your specific needs.

Table of Contents