4 thoughts on “Finding Diagnostic Settings Configuration for Azure Resources”

Leave a comment...

  1. Is there a wat to get a list for the Diag Settings for all Azure resources, or is it only possible to query one resource at a time?


  2. Hello Jeff,
    Thanks for your comment.
    At the time of this writing, we cannot get the list of the Diag Settings for all Azure resources without querying one resource at time.
    As described in this article, I am filtering first the resources which have Diag enabled (and not all Azure resources), and then I am querying each Azure resource to get their Diag Settings.
    Hope this helps!

  3. can I get script only true or false in VM through Get-AzVMDiagnosticsExtension
    if Get-AzVMDiagnosticsExtension is present true or else false

  4. Hello Rudraraju,
    You can use the following command to get the status of the VM Diagnostics Extension.
    <i>$diagVMSettings = Get-AzVMDiagnosticsExtension -VMName "VMName" -ResourceGroupName "ResourceGroupName" if ($diagVMSettings) {Write-Output "True is present"} else {Write-Output "False is NOT enabled"}</i>
    Hope this helps!

Let me know what you think, or ask a question...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to Stay in Touch

Never miss out on your favorite posts and our latest announcements!

The content of this website is copyrighted from being plagiarized!

You can copy from the 'Code Blocks' in 'Black' by selecting the Code.

Please send your feedback to the author using this form for any 'Code' you like.

Thank you for visiting!