Forum Discussion

nathan_mitten_rpa's avatar
nathan_mitten_rpa
Copper Contributor
Dec 23, 2019
Solved

VM Agent Status and Version Reporting

Hello, I'm trying to see if there is anyway to pull information that is listed in the portal via PS/CLI/API/Graph across subscriptions.   I'm specifically looking for the current "Agent Status" and...
  • hspinto's avatar
    Dec 26, 2019

    nathan_mitten_rpa, when you query for an individual VM with the "Status" switch, you get the VM Agent details, as follows:

     

    $vm = Get-AzVm -Name "vm name" -ResourceGroupName "RG name" -Status

    $vm.VMAgent.VmAgentVersion

     

    However, the VM must be running to get all the details.

Resources