Arc agent update

Ghanshyam Pardeshi 0 Reputation points
2025-11-25T20:16:24.2166667+00:00

We have more than 1000 servers with very old arc connected agent version like 1.17.****

How can we upgrade the agent version to the latest one i.e. 1.58** at scale via some automation? I know how to do it manually but it's very time consuming and doesn't seems to be feasible for such large number of servers. Any idea on how we can achieve the agent version update to the latest one?

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-25T20:18:28.2033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To upgrade the Azure Connected Machine agent across a large number of servers, such as your 1000+ servers with an outdated version, consider the following automated approaches:

    1. Azure Update Manager: This tool can orchestrate updates for your Azure Arc-enabled servers. You can schedule updates or deploy them on-demand, ensuring that the latest agent version is applied without manual intervention.
    2. PowerShell Automation: You can create a PowerShell script that utilizes the Update-AzConnectedMachineExtension command to automate the upgrade process. This script can iterate through a list of your servers and apply the update to each one.
      • For Windows servers, you can use:
             Update-AzConnectedMachineExtension -ResourceGroup <resource-group-name> -MachineName <arc-server-name> -Name AzureMonitorWindowsAgent -EnableAutomaticUpgrade
        
      • For Linux servers, the command would be:
             Update-AzConnectedMachineExtension -ResourceGroup <resource-group-name> -MachineName <arc-server-name> -Name AzureMonitorLinuxAgent -EnableAutomaticUpgrade
        
    3. Azure CLI: You can also use Azure CLI to automate the upgrade process. Create a script that runs the following commands for each server:
      • For Windows:
             az vm extension set --name AzureMonitorWindowsAgent --publisher Microsoft.Azure.Monitor --vm-name <virtual-machine-name> --resource-group <resource-group-name> --enable-auto-upgrade true
        
      • For Linux:
             az vm extension set --name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --vm-name <virtual-machine-name> --resource-group <resource-group-name> --enable-auto-upgrade true
        
    4. Automation Accounts: Set up an Azure Automation account with runbooks to automate the upgrade process. You can schedule these runbooks to run at specific intervals, ensuring that all servers are kept up to date with the latest agent version.

    By leveraging these automation tools and scripts, you can efficiently manage the upgrade of the Azure Connected Machine agent across your extensive server fleet without the need for manual updates.

    0 comments No comments

  2. Siva shunmugam Nadessin 3,025 Reputation points Microsoft External Staff Moderator
    2025-11-26T00:18:30.0733333+00:00

    Hello Ghanshyam Pardeshi,

    It seems like you're looking for a way to upgrade the Azure Arc connected agent on over 1000 servers from an older version (1.17) to the latest (1.58) using automation. While manual upgrades work, they're indeed not practical for such a large scale.

    Here’s a way you can automate the upgrade process:

    Use Azure Update Manager: Since you're managing Arc-enabled servers, you can leverage Azure Update Manager to automate the update of the connected agents on these machines. The Update Manager manages the assessment and application of updates through the Azure extension.

    Script the Upgrade: You can create a PowerShell script that pulls the latest version of the agent and executes the installation on each server. You can use Invoke-Command to run this PowerShell script across your servers.

    Use the Azure CLI: Another approach is to use the Azure CLI. By installing the arcdata extension and using the available CLI commands, you can automate the installation and upgrade processes.

    Regular Assessment Scheduling: Set up a schedule for regular assessments and installations through Azure Update Manager to ensure your servers stay updated.

    Use Configuration Management Tools: If you’re using tools like Ansible, Chef, or Puppet, you can also integrate Azure management commands to streamline this process.

    Here’s a basic example PowerShell script you can adapt to handle the upgrade process:

    $servers = @('Server1', 'Server2', 'ServerX') # Add your server names here
    Invoke-Command -ComputerName $servers -ScriptBlock {
        $latestVersionUrl = "https://packages.microsoft.com/..."
        # Download and install the latest Arc agent version
        Invoke-WebRequest -Uri $latestVersionUrl -OutFile "C:\Path\To\AgentInstaller.exe"
        Start-Process "C:\Path\To\AgentInstaller.exe" -ArgumentList "/quiet"
    

    Make sure to test this in a non-production environment first!

    Follow-Up Questions:

    • Are all your servers accessible through PowerShell remoting or do they have different access methods?
    • What configuration management tools (if any) are you currently using?
    • Is there a specific timeframe in which you want to complete this upgrade?
    • Do you have any specific security or compliance requirements that need to be considered during the upgrade?

    References:

    Hope this helps! Let me know if you have any other questions or need further assistance!

     

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.