Cleanup ActiveSync device partnerships


This script removes orphaned ActiveSync device partnerships from Exchange Server 2010 user mailboxes. Run the script as a scheduled job to properly maintain your Exchange Server environment.

Modify the script path variables to fit your requirements. The variables are configured in the ### BEGIN Variables section.

Steps being executed by the script:

  1. Fetch all user mailboxes
  2. Iterate through each user mailbox and determine the number of ActiveSync devices and the number of devices that have not synchronized since 150 days
  3. Delete ActiveSync device registration, if a user has more than 4 devices in total and a minimum of 1 device that has not synced within 150 days



Version History

  • 1.0, Initial community release


Additional Credits

Additional credits go to Sebastian Rubertus


%d Bloggern gefällt das: