Abstract: Every mobile device connected to Microsoft Exchange has an ActiveSync partnership entry stored in the ActiveDirectory, also if the device is no longer used by the owner. So how can these entries be purged automatically?

For every user there is an ExchangeActiveSyncDevices object (child from the user object) which contains (for every ActiveSync partnership) the user is using an msExchActiveSyncDevice object. As a default rule the exchange server will not delete device partnerships. The user need to use OWA (more infos here) or the Exchange Administrator can do that via GUI/Powershell:

The issue here is, that if the user & administrator do not perform these actions, hese configured device partnerships will grow and grow. In the end the user might have ten device partnerships (depending on your config) configured but is using only one device. If the policy (default one) now only allow ten device partnerships per user, the user get an error that he isn´t able to configure a new device:

Error with your new mobile phone partnership. You have 11 phone partnerships out of the maximum allowed 10 partnerships.

Or with Exchange 2013/2016 (with Exchange Online Microsoft takes care of that without your needs) you can use the throttling policy and the EasMaxInactivityForDeviceCleanup option. Microsoft described that option as followed:

The EasMaxInactivityForDeviceCleanup parameter specifies the length of time that a user's device partnerships will remain active. By default, there is no limit to the number of days that a user's device partnerships will remain active. Use this value if you want to minimize the amount of inactive device partnerships in your organization. To use this setting, specify a value in days since the user's last sync time to cause the device partnership to be removed.

To implement that you might wish to change the default throttling policy and change the EasMaxInactivityForDeviceCleanup from $Null or "unlimited" to a value you prefer (e.g. 14 days). But a better way would be a company throttling policy which you assign directly to your users. This can be done via the following steps:

If the new throttling policy is assigned now (and therefore the EasMaxInactivityForDeviceCleanup value changed) and if a user try to add a new device, the throttling policy will kick in, check how many devices are no longer in use and will delete the one which fits the throttling policy EasMaxInactivityForDeviceCleanup value. This approach to check that during adding a new device is chosen by Microsoft to save server system resources. Because via this approach the server isn´t running a cleanup multiple times a day/week/month, it is only running a cleanup when he needs to do that.