PowerShell Pro template · Intermediate · Read-only · Low risk

Find stale Intune devices

Finds managed devices that have not synced recently.

What this PowerShell script does

Finds managed devices that have not synced recently.

Requirements

  • Stale days — e.g. 30
  • CSV output path — Example: C:\Temp\report.csv

Environment

  • Module: Microsoft.Graph.DeviceManagement
  • Permissions: DeviceManagementManagedDevices.Read.All
  • Output: CSV report
  • Context: PowerShell 7 · Microsoft Graph
  • Risk: Low

Why use this template?

Use this PowerShell template when you need to Finds 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

  1. Open the template in the PowerShell Builder.
  2. Review the purpose, requirements, permissions, output and risk.
  3. Activate Pro when you are ready to generate the full script, then test it outside production.

Pro templates remain previewable before purchase or activation. Nothing needs to be uploaded to Opselith.Preview Find stale Intune devices →