Forum Discussion
Invoke-LogAnalyticsQuery only returns Tables JSON Array and not Results Array
- Jan 14, 2018
Hi Brady,
First, I must comment on your query. You should avoid queries that has 'search * | where Type =='. Instead the query below should just be: 'Heartbeat | take 10'. Search * is very inefficient way to use the system.
Regarding the results array. I ran the same code but didn't managed to reproduce. I got both tables and results.
Sorry
Meir
Thanks. I did verify I am getting the results you indicate in the Results array is there. The documentation for the CMDLET is a bit confusing (https://dev.loganalytics.io/documentation/Tools/PowerShell-Cmdlets) but I see what's going on now. I also vote for a properly signed supported module here. Thanks a lot for the help.
Following up on this, we've made the a cmdlet available for querying as part of the Azure RM cmdlets in the gallery. If you don't already have them, see here: https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-5.3.0
Documentation for the new cmdlet is here: https://docs.microsoft.com/en-us/powershell/module/azurerm.operationalinsights/invoke-azurermoperationalinsightsquery?view=azurermps-5.3.0
Try it out and let us know what you think!