Forum Discussion

kileri _'s avatar
kileri _
Copper Contributor
Oct 13, 2017
Solved

Upgrading the workspace for improved query cause ps to stop working

Hello all,

 

Previous to workspace upgrade, I was able to issue a query with Get-AzureRmOperationalInsightsSearchResults and get proper results back. After upgrade this is what I am getting back. Any advise on how to troubleshoot the issue?

 

$OmsQuery='AzureDiagnostics | where Category !contains "Output" '

Get-AzureRmOperationalInsightsSearchResults -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Query $OmsQuery


Id :
Metadata : Microsoft.Azure.Commands.OperationalInsights.Models.PSSearchMetadata
Error : Microsoft.Azure.Commands.OperationalInsights.Models.PSSearchError
Value :

3 Replies

  • kileri _'s avatar
    kileri _
    Copper Contributor

    Never mind. The https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-log-search-faq state that cmdlet is not yet upgraded.

     

    PowerShell cmdlets Question: Does the Log Search PowerShell cmdlet get updated after I upgrade?

    The https://docs.microsoft.com/powershell/module/azurerm.operationalinsights/Get-AzureRmOperationalInsightsSearchResults has not yet been upgraded to the new search language. Continue to use the legacy query language with this cmdlet, even after you upgrade your workspace. Updated documentation will become available for the cmdlet when it's updated.

Resources