Why use this template?
Use this PowerShell template when you need to summarize managed devices by compliance state. It can be previewed in the Builder; Pro access is required to generate it for your own environment.
The template uses Microsoft.Graph.DeviceManagement and requires DeviceManagementManagedDevices.Read.All. Output: CSV report. Level: Intermediate. Action: Read-only. Risk: Low.
Review before running
The script remains preview-only until Pro access is enabled. Review it before running it, and test it outside production first. “Read-only” describes the script itself; anything you add around it can still change data.
Preview the script
- Open the template in the PowerShell Builder.
- Review the purpose, requirements, permissions, output and risk.
- Activate Pro when you are ready to generate the full script, then test it outside production.
Pro templates remain previewable before purchase or activation. No tenant connection is required. When you generate a Pro script, only the configuration values needed for that template are sent to Opselith after license validation.Preview Summarize Intune devices by compliance state →
How to use this result
Use this report for a quick count of managed-device records grouped by the compliance state Intune currently returns.
When this helps
- Create a high-level compliance distribution snapshot before investigating individual devices.
- Compare the relative size of compliant, noncompliant, grace-period and other returned states.
How to read the result
- The output contains state names and counts only; it does not identify the affected devices or policies.
- Different states such as unknown, error or conflict should not be silently treated as noncompliant without separate review.
Things to check
- A summary can hide which policy or setting caused a device-level result.
- Counts are a point-in-time snapshot and can change as devices sync and policies evaluate.
What to do next: Use the focused non-compliant device report and policy inventory for any state that needs investigation.
Related tasks
Official references