Skip to content

Commit

Permalink
Fix get diag settings for resource
Browse files Browse the repository at this point in the history
  • Loading branch information
plzm committed Apr 24, 2024
1 parent 8c3a4e3 commit c1c2c26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/AzureMonitor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ function Get-DiagnosticsSettingsForResource()
Write-Debug -Debug:$true -Message "query = $query"

# Main resource diagnostic settings
$settings = "$(az monitor diagnostic-settings list --subscription $SubscriptionId --resource $ResourceId --query "$query" 2>nul)" | ConvertFrom-Json
#$settings = "$(az monitor diagnostic-settings list --subscription $SubscriptionId --resource $ResourceId --query "$query" 2>nul)" | ConvertFrom-Json
$settings = "$(az monitor diagnostic-settings list --subscription $SubscriptionId --resource $ResourceId --query "$query")" | ConvertFrom-Json

if ($settings) { $result.Add($settings) | Out-Null }

Expand Down

0 comments on commit c1c2c26

Please sign in to comment.