Endpoint Manager: Device Estate Cleanup
Upkeep of your devices within your Endpoint Manager estate

Introduction
When it comes to devices which you have enrolled into your Endpoint Manager, there can be a build up of either rogue or orphaned devices which can end up cluttering your statistics when it comes to looking into and extracting information to find out exactly what you have that is active.
This post will investigate and highlight some areas which can be useful to understand where we can help clean up these types of devices.
Though some of this information may seem obvious there is still relevance to understand what you actually have as manual tasks to clean-up these types of devices can really add onto the administrative effort which you already have. So hopefully we can identify these things and keep things tidy :)
All Devices Views & Reports
This is perhaps more of the manual side of looking at which devices are current by the last times that they have actually checked in.
Whilst helpful it may not always explain the overall reasons as to why devices haven't checked in. We have to take into account many scenarios such as devices could be perhaps turned off, not working, or even in some cases policy issues too.
The same results are provided when we look at reports. Here is a report based on Device Compliance below in Figure 1.2 detailing the compliance levels across all devices. Both options being the views and reports provide a more general information breakdown which would allow the administrator to see which are still active and not.
If connecting to the Intune DataWarehouse via PowerBI you will also get the same results.
Device Clean-up Rules
Quite similar options are seen in SCCM too where you have site maintenance tasks which can look through stale records. In this case we have a very similar option here with the device clean-up rules where we can automatically clean-up devices which are based on a number of days from the current check-in date as seen in Figure 1.3
You have a minimum of 30 days and maximum of 270 days to decide from. In my experience 30 days is normally considered orphaned, however there can be circumstances which can cause this. Lets say for example a load of devices experience issues with checking in due to issues with policies, authentication issues etc... now it may seem a stretch that someone could overlook and issue like this for 30 days..but it can happen :)
So caution should be taken when deciding this configuration. Very much so when it comes to SCCM too.
Intune Device Records/Azure Device Records Cleanup
This particular one here can be a quite overlooked bit. Especially for those who frequently provision devices when utilising Autopilot.
When removing or rebuilding devices, though you may have deleted it from places such as the Autopilot table and even the devices table, it doesn't necessarily get rid of the Azure AD device. Assuming that you are using Azure AD Domain joins in conjunction with your auto enrolment whether using Autopilot or not.
You might find that if you add a device back into Endpoint Manager in Autopilot, the device will automatically assign itself back to its original azure device record. Now if you are planning to use similar existing details this might be fine, but if not then this can lead to a mismatch on information and auditing when wanting to find out information on either record especially if different names are being used or naming convention policies are being applied in your Autopilot profile or simply added manually into the Autopilot device record.
You may even find resistance when trying to remove a device from Autopilot if the device already has an associated azure device record.
As you see in Figure 1.4 you have the Autopilot device record. If you click the Associated Azure AD device name, this will then take you to the azure device record as seen in Figure 1.5.
Once the record from Autopilot has been deleted the azure AD device would be eligible to be removed, but something to bare in mind when going through the process of reprovisioning.
Conclusion
Overall there are a few things to consider when wanting to get things tidy but also to show areas in which the clutter can indeed start to build up.




