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.
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".
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
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.
Let me know if this is not what you are looking for.