Why use this template?
Use this PowerShell template when you need to find managed devices that have not synced recently. 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 Find stale Intune devices →
How to use this result
Use this report to identify Intune managed-device records that have not reported a recent sync according to the selected threshold.
When this helps
- Prepare a stale-device review before cleanup, migration or license/device-management work.
- Find devices with old or missing Intune sync data for owner verification.
How to read the result
- The script treats a blank LastSyncDateTime or a value older than your cutoff as stale for this report.
- Intune last sync is different from Entra ApproximateLastSignInDateTime and from proof that a physical device is unused.
Things to check
- A blank sync value needs investigation rather than automatic deletion.
- Retired, replaced, re-enrolled or otherwise duplicated device records can require context from Entra, Autopilot and the device owner.
What to do next: Confirm the device owner, enrollment state and related Entra/Autopilot records before retiring or deleting anything.
Related tasks
Official references