Created
May 19, 2025 21:13
-
-
Save blakedrumm/575da5807a18fc412c2d9627b750ba22 to your computer and use it in GitHub Desktop.
Retrieves Azure Arc-enabled machines with their agent version, OS version, status, cloud provider, and last status change timestamp (in UTC). Helps identify machines with outdated Arc agents or stale status updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources | |
| where type == "microsoft.hybridcompute/machines" | |
| extend | |
ArcAgentVersion = tostring(properties.agentVersion), | |
OSVersion = tostring(properties.osSku), | |
MachineName = tostring(properties.machineFqdn), | |
Status = tostring(properties.status), | |
LastStatusChangeRaw = todatetime(properties.lastStatusChange), | |
LastStatusChangeUTC = format_datetime(todatetime(properties.lastStatusChange), 'yyyy-MM-dd HH:mm:ss'), | |
Provider = tostring(properties['cloudMetadata']['provider']) | |
| project MachineName, ArcAgentVersion, OSVersion, Status, Provider, LastStatusChangeUTC | |
| order by ArcAgentVersion desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment