List all mobile devices connected using ActiveSync on Office 365
It is very important to be able to see exactly which mobile devices are connected to your Office 365 tenant. Old or unused devices that remain connected could pose a serious security risk and even result in a data breach, especially if they are not owned or used by the employee any more.
The best way to manage mobile device connections is by reviewing a list of all that are connected to Office 365, and use this to verify that all devices are currently in use by your employees. This PowerShell script will not only enable you to pull up a list of all devices, but it also includes the corresponding owners within your organisation.