Forum Discussion

Rahul_Mahajan's avatar
Rahul_Mahajan
Brass Contributor
Mar 11, 2020
Solved

VM details query

Hi Team,   Trying to query VM details using KQL but unable to include different thing in query.   VMComputer | where _ResourceId != "" | summarize by TimeGenerated, HostName, AzureImageSku, Az...
  • CliveWatson's avatar
    Mar 11, 2020

    Rahul_Mahajan 

     

    Those data types are arrays, so need to be strings at the end of a Summarize - I used tostring to allow this 

     

    Go to Log Analytics and run query

     

    VMComputer
    | where _ResourceId != ""
    | summarize by TimeGenerated, HostName, AzureImageSku, AzureResourceGroup,
                   AzureLocation, AzureSize, Cpus, DependencyAgentVersion, 
                   PhysicalMemoryMB, OperatingSystemFamily, OperatingSystemFullName, 
                   VirtualMachineType, VirtualizationState,
                   tostring(Ipv4Addresses), tostring(Ipv4DefaultGateways), tostring(Ipv4SubnetMasks), tostring(MacAddresses)

Resources