The Invoke-AzOperationalInsightsQuery cmdlet returns the search results based on the specified parameters.
You can access the status of the search in the Metadata property of the returned object.
If the status is Pending, then the search has not completed, and the results will be from the archive.
You can retrieve the results of the search from the Value property of the returned object.
Please check detail of general query limits here:
https://learn.microsoft.com/azure/azure-monitor/service-limits#log-queries-and-language.
Note: try setting -Wait to a larger value if you experience the error 'The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing'.
Some queries can result in very large data sets being returned. Because of this, the default behavior of the cmdlet is to return an IEnumerable to reduce memory costs. If you'd prefer to have an array of results, you can use the LINQ Enumerable.ToArray() extension method to convert the IEnumerable to an array.
Example 3: Get search results using a query over a specific timeframe
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.