Why use this template?
Use this PowerShell template when you need to find multiple managed devices sharing the same serial number. It is generated locally and can be reviewed before you run it yourself in your own PowerShell session.
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 is generated in your browser. Read it before you run it, and test it outside production first. “Read-only” describes the script itself; anything you add around it can still change data.
Generate the script
- Open the template in the PowerShell Builder.
- Enter the requested values and review the module, permissions, output and risk.
- Generate the script, read it carefully, and test it outside production before use.
The script is generated locally in your browser. Nothing needs to be uploaded to Opselith.
Generate Find duplicate Intune serial numbers →How to use this result
Use this report to group managed-device records by SerialNumber and return serials that appear more than once.
When this helps
- Find potential duplicate or re-enrolled managed-device records during cleanup.
- Compare device IDs, names, users and compliance state for records sharing a serial number.
How to read the result
- DuplicateCount is the number of Intune managed-device records sharing that nonblank serial value.
- A repeated serial can indicate duplicate/re-enrolled records, but it can also reflect vendor or inventory-data quirks that require verification.
Things to check
- Blank serial numbers are excluded rather than grouped together.
- Do not delete duplicate-looking records until you have identified the current active enrollment and related Entra/Autopilot identity.
What to do next: Compare last sync, device IDs, enrollment context and Autopilot/Entra records to determine which records are current.
Related tasks
Official references