Cannot update Arc extensions with powershell

MarcVanderhaegen 241 Reputation points
2024-01-17T14:03:01.1566667+00:00

Hello, I am trying to 'force' the update of the extensions on our machines through pwoershell but I can't get it working. For example, I launch this command :

Update-AzConnectedMachineExtension -MachineName <machinename> -ResourceGroupName <rg> -Name "AzureMonitorWindowsAgent" -AsJob

A job is created; in the Arc portal I breefly see the status of the extension as 'Updating' but it last only a few seconds and then it goes back to 'Succeeded'.
The powershell job is then marked as 'completed' and the result is 'succeeded'. The only problem is that nothing is done, the extension is not updated and stays at the same version. I have tried updating the extension AzureMonitorWindowsAgent, MDE.Windows and ChangeTracking-Windows who all have available update but it doesn't work.
Can someone tell me what I am missing ? Thanks
Marc

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

Accepted answer
  1. Ryan Willis 236 Reputation points Microsoft Employee
    2024-01-17T21:51:30.92+00:00

    I'm going to assume your intent is to upgrade the extension to a new version. If that's not the case, please let me know and I'll update my response. Update-AzConnectedMachineExtension is used to change settings or other properties of the extension. It can be used to upgrade to a newer version, but you must explicitly tell it what you want to do by passing the -TypeHandlerVersion "W.X.Y.Z" parameter, where W.X.Y.Z is the version number of the extension you want it to run. You also need to re-specify any settings for the extension. We recommend using the similarly named Update-AzConnectedExtension cmdlet which is intended to preserve settings and allow you to upgrade one or more extensions at a time on a server. It still requires you to provide the explicit version number you wish to upgrade/downgrade the extension to. You can get the list of available versions with az connectedmachine extension image list (we're need to fix the output of the PowerShell equivalent, so Az CLI or REST is your best option presently).

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful