List all Azure Arc Agent versions

Bombbe 1,621 Reputation points
2022-02-17T16:45:50.067+00:00

Hi,
I could not find information how can get (if it is even possible) current agent version of Azure Arc Server from all vms once / bulk. At least command following command do not provide that information so that I could loop trough Arc Servers.

Get-AzConnectedMachine  

So I'm interested from the highlighted part.
175496-image.png

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

Accepted answer
  1. tbgangav-MSFT 10,426 Reputation points
    2022-02-18T05:30:43.14+00:00

    Hi @Bombbe ,

    I understand that you are trying to get the agent version of the Azure Arc enabled machine using Az PowerShell. To get that, you would have to use Get-AzConnectedMachine Az PowerShell cmdlet as you were already doing that.

    But as shown in below screenshot, if we execute just the cmdlet then it shows only few default properties as part of the output.

    175681-image.png

    To get the properties, members and methods of the objects generated by any cmdlet, you may have to use Get-Member PowerShell cmdlet.

    As shown in below screenshot, I have tried the same for Get-AzConnectedMachine and could see that there is a property called "AgentVersion".

    175645-image.png

    So, the final command can be something as shown in below screenshot and its matching with the Agent Version that's being shown in Azure Portal as well.

    Get-AzConnectedMachine | Select AgentVersion  
    

    175654-image.png

    175655-image.png

    Also, as shown in below screenshot, most of the cmdlet supported members, properties and objects can be found in a easy way using Format-List cmdlet as well.

    175701-image.png

    Let me know if this is not what you are looking for.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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