<?xml version="1.0"?>
<Settings>
<EmailSettings>
<SMTPServer>smtp.mcsmemail.de</SMTPServer>
<SMTPPort>25</SMTPPort>
<MailFrom>postmaster@mcsmemail.de</MailFrom>
<MailTo>postmaster@mcsmemail.de</MailTo>
</EmailSettings>
<OtherSettings>
<!-- MobileDeviceLimit defines the overall threshold of mobile devices for a single user to synchronize. Default is 5. -->
<MobileDeviceLimit>5</MobileDeviceLimit>
<!-- AgedDeviceLimit defines the threshold of allowed aged devices for a single user to be removed. Default is 1. -->
<AgedDeviceLimit>1</AgedDeviceLimit>
<!-- Time threshold in days to identify old mobile devices, Be default devices not synchronized for 150 days will be removed -->
<LastSyncDays>150</LastSyncDays>
</OtherSettings>
</Settings>

Steps being executed by the script:

Fetch all user mailboxes hosted on Exchange Server 2013 or later

Iterate through each user mailbox and determine the number of mobile devices and the number of devices which have not synchronized since 150 days

Remove mobile device registration, if a user has more than the allowed number of devices in total and a minimum of 1 device that has not synced within 150 days and the -ReportOnly switch has not been used

It should be noted that most of the tutorials have been written using an Exchange Server lab environment with just a few legacy public folders. Therefore, some readers tend to beleive that you only need one modern public folder mailbox. That is not true. In a large legacy public folder infrastructure you will end up with a multiple public folder mailboxes. And the number of mailboxes required to serve the public folder hierarchy.

A larger public folder migration batch using 66 public folder mailboxes looks like this:

Updates

2016-12-20: Public folder migration batch example added

You need assistance with your Exchange Server setup? You have questions about your Exchange Server infrastructure and going hybrid with Office 365? Contact us at office365@granikos.eu or visit our website https://www.granikos.eu.