Why use this template?
Use this PowerShell template when you need to find multiple managed devices using the same device name. 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 device names →How to use this result
Use this report to group managed-device records by DeviceName and return names that appear more than once.
When this helps
- Find duplicate-name records during helpdesk, migration or device-cleanup work.
- Compare serial number, user and last sync to separate expected naming reuse from duplicate enrollment records.
How to read the result
- DuplicateCount shows how many current managed-device records share that nonblank device name.
- A duplicate device name is not proof that the records represent the same physical device.
Things to check
- Naming conventions can intentionally reuse names in some provisioning scenarios.
- Serial number, Intune device ID, Entra device ID and last sync are stronger correlation signals than name alone.
What to do next: Correlate duplicate names with serial, device identifiers and recent sync before cleaning up records.
Related tasks
Official references