Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fabiocannas/67ebe90151f75fb418f8a02a1f9fd89c to your computer and use it in GitHub Desktop.
Save fabiocannas/67ebe90151f75fb418f8a02a1f9fd89c to your computer and use it in GitHub Desktop.
Azure Resource Graph - KQL query for Azure Update Manager patch installation results
arg('').patchinstallationresources
| where type in ("microsoft.compute/virtualmachines/patchinstallationresults", "microsoft.hybridcompute/machines/patchinstallationresults")
| where properties.status == "Failed" or properties.status == "CompletedWithWarnings"
| where properties.lastModifiedDateTime > ago(1d)
| parse id with vmResourceId "/patchInstallationResults" *
| project vmResourceId
| distinct vmResourceId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment