This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.
Hi there , in my previous post named Maintain Your Microsoft Monitoring Agent Up To Date With Azure Automation, I discussed a possible method for updating the Microsoft Monitoring Agent (MMA) at scale.
Today I would like to talk to you about a similar approach to use on Azure Arc enabled servers. The corresponding agent called Connected Machine agent receives improvements on an ongoing basis. You can check the what is the latest version and what’s in it on the What's new with Azure Arc enabled servers agent Microsoft’ documentation page.
Since the Connected Machine agent (aka Arc agent) is not an extension, it cannot be updated automatically by the Azure platform itself as for other extensions (i.e., MMA, AMA, Dependency agent, etc.). With that said, and always considering the Shared responsibility in the cloud, how can you maintain that agent up to date?
Well, there are at least three methods:
- Azure Automation
- Software Distribution
- Windows Update
In this post I will focus on the 1st method that requires, indeed, an Automation Account already created and configured as well as the Hybrid Runbook Worker role deployed on the Arc enabled server you want to update the agent on (see image below for an overview of communication flow).
Without focusing on the Automation Account and Hybrid Runbook Workers for which you can refer to the documentation, let us get into the PowerShell that the runbook is made of. The script requires just one parameter: the proxy server, with which the target Arc enabled server can connect to Internet to download the new agent version, in the form of http://proxyname:port.
Below reported, there is the script code I created for Windows-based computers:
Copy/Paste the above code into a new script, TEST IT, TEST IT AND TEST IT AGAIN and if everything works as expected import it into a new runbook and schedule it accordingly. Wait for the execution and check the agent version in the Arc enabled server you run the script/runbook on and … the game is done.
The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.