Automate non-Azure servers with Azure Arc-enabled servers

Azure Arc-enabled servers allows you to project your hybrid servers (on-premises or any cloud provider) to the Azure control plane where you can start managing them as any other Azure server. You can start using native Azure capabilities like Security Center, tagging, automation, policy, monitoring and more. For a quick recap on what Azure Arc provides, you can explore my previous article.

Hybrid Worker Extension for Arc-enabled servers

It was recently announced that native integration of user hybrid workers which is based on VM extensions is in public preview for Azure Arc-enabled servers which opens up more automation capabilities for hybrid servers.

This capability allows you to run automation runbooks on your servers wherever they are, and plug into the power of Azure Automation to further automate manual procedures you need to perform on your servers.

In this post, i will explore this new capability and use it to automate the Azure Arc connected machine agent upgrade process on my on-premises servers.

💡 For Windows Arc-enabled servers, you can also use Azure Update Management to automation the agent upgrade via Windows update


I have already on-boarded a virtual machine that resides on my laptop to Azure Arc with an old agent. Hyper-v servers

Arc-enabled server

Azure advisor provides recommendations for Arc-enbaled servers with old agent versions so after some while it triggered a recommendation for my servers.

Advisor recommendation

Now we need to leverage this recommendation to trigger an automation on our Arc-enabled servers to download and install the new agent. Let’s start creating this process 🚀🚀

First, we need to create a new user hybrid worker.

New hybrid worker

New hybrid worker Adding our Arc-enabled server to this new hybrid worker group

Add all hybrid workers

Next, we need to create the actual runbook that will download and install the new updated agent.

Runbook creation

The missing part now is how to trigger this runbook when a new agent update is available. Luckily, we can create an alert based on Azure Advisor recommendations. Clicking on the recommendation we want, we can create a new alert ⚠️

Azure Advisor alert

We need to create a new Action group and select Azure Automation as the action.

Action group creation

Click on “Configure Parameters” to make sure this runbook will run on out hybrid worker group (Arc-enabled servers)


Action group action

Alert creation form

Now, we can see our alert created and ready to be triggered when a new agent version is available

azure advisor alert

Checking the current version of the connected machine agent.

Agent version

After waiting for some while, we can see the Azure Advisor started triggering recommendations for our Arc-enabled servers.

Agent azure advisor

Looking at alerts, we can see that our alert has been triggered and as a result the agent upgrade runbook started running on our servers.

alert fired

runbook jobs

Going back to our Arc-enabled servers, we can see that the agent version has changed and it was upgraded to the latest version.

agent new version


Hybrid Worker Extension for Arc-enabled servers is a great way to automate your Arc-enabled servers whether they live on-premises or in another cloud. It opens up a great deal of possibilities to empower you to automate your infrastructure centrally and consistently without caring where the servers live.

Share on:

You May Also Like