Remove Exchange Server 2013+ Mobile Device Partnerships
This script removes mobile device association from user mailboxes that have been inactive for more than X days.
Use the settings.xml to configure your email server settings and the min number of days for old mobile devices.
- Exchange Server 2013, 2016, 2019
- Windows Server 2012 R2+
- Exchange Management Shell
Check only a give mailbox or some mailboxes for aged mobile devices. Preferably, you use the Alias. This parameter works with wildcards, e.g., USER*
Send the list of found mobile devices by email. Email settings are controlled by a dedicated settings.xml file. See script link for more details.
Just create a report for all found mobile devices, but DO NOT DELETE the mobile device partnerships.
.\Remove-MobileDevicePartnership.ps1
Remove old mobile device partnerships without sending a report email
.\Remove-MobileDevicePartnership.ps1 -SendMail
Remove old mobile device partnerships and send a report email
.\Remove-MobileDevicePartnership.ps1 -ReportOnly
Search for old mobile device partnerships and write results as CSV to disk
.\Remove-MobileDevicePartnership.ps1 -MailboxFilter USERALIAS -SendMail
Remove old mobile device partnerships for a single mailbox and send a report email
THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
Written by: Thomas Stensitzki
- My Blog: http://justcantgetenough.granikos.eu
- Twitter: https://twitter.com/stensitzki
- LinkedIn: http://de.linkedin.com/in/thomasstensitzki
- Github: https://github.com/Apoc70
- MVP Blog: https://blogs.msmvps.com/thomastechtalk/
- Tech Talk YouTube Channel (DE): http://techtalk.granikos.eu
For more Office 365, Cloud Security, and Exchange Server stuff checkout services provided by Granikos
- Blog: http://blog.granikos.eu
- Website: https://www.granikos.eu/en/
- Twitter: https://twitter.com/granikos_de
- Sebastian Rubertus developed the original version for Exchange Server 2010