Repository navigation
IntuneAutomation Scripts 2026.07.29
Fixes
Cleanup Duplicate Intune Device Records 1.2
The script now clearly states that it evaluates duplicate Intune managed-device records only. Its title, synopsis, examples, parameter help, report headings, summaries, and MCP catalog metadata now consistently describe that scope.
This clarification addresses confusion when an administrator sees duplicate-looking Windows objects in Microsoft Entra ID but the script reports only Intune duplicates. The script queries /deviceManagement/managedDevices, so Entra-only objects with no Intune management record are intentionally outside its results.
Safety and reliability
- Added a runtime scope banner before device retrieval.
- Added explicit warnings that Microsoft Entra device objects and Windows Autopilot registrations are not evaluated or removed.
- Documented that Hybrid Autopilot deployments can create expected duplicate-looking Entra objects.
- Preserved the existing serial-number matching, keeper selection, confirmation, WhatIf, and deletion behavior.
These changes reduce the risk of treating an Autopilot registration anchor as an obsolete Intune device record.
Compatibility
There are no breaking changes. Parameters, Microsoft Graph permissions, endpoint selection, exported report shape, and deletion behavior are unchanged. Existing automation can continue using the script without modification.
Upgrade notes
Administrators using a downloaded or imported copy should replace or reimport the script to receive version 1.2 and its updated safety guidance. Azure Automation runbooks do not automatically replace previously imported script content.
Known limitation
The script does not find or clean duplicate Microsoft Entra device objects or Windows Autopilot registrations. This remains intentional because those records require separate lifecycle checks, especially in Hybrid Autopilot environments.