Skip to main content

Mobile devices connected to Exchange Online mailboxes

Which mobile devices are connected to mailboxes, which operating system does each use, and what is its access state?

Exchange OnlinePowerShell 7.6 Read-only
Cmdlet lint
Passed
30 Nov 2026
Changes anything
No
Read-only
Pinned versions
2

Script

exchange-mobile-devices.ps1
#Requires -Modules ExchangeOnlineManagement
# Mobile devices connected to mailboxes, with access state and first sync time. Read-only.

Connect-ExchangeOnline -ShowBanner:$false

Get-MobileDevice -ResultSize Unlimited |
    Sort-Object UserDisplayName, FriendlyName |
    Select-Object UserDisplayName, FriendlyName, DeviceModel, DeviceOS, DeviceType, DeviceAccessState, DeviceAccessStateReason, FirstSyncTime

Checked automatically against Microsoft's published cmdlet reference. KBY hasn't run it in your tenant; run it in a test environment first.

Reading the output

  • Each row is one device that has a partnership with a mailbox. The script selects the owner (UserDisplayName), device name, model, operating system, device type, access state and its reason, and FirstSyncTime. Microsoft's Get-MobileDevice page lists each of these as a property you can filter and sort by, but it does not publish the full output property list.
  • It shows when a device first synced, not when it last synced, so it cannot tell you which devices have gone quiet.
  • Get-MobileDevice returns 1000 results by default, so the script passes -ResultSize Unlimited to list every device.
  • ExchangeOnlineManagement 3.10.0 and later require PowerShell 7.6 when run in PowerShell 7 (Windows PowerShell 5.1 is unaffected), per the module release notes.

Sources

The Microsoft reference page for every cmdlet the script calls, plus the API and product pages behind each permission and caveat.

Found this useful? Follow KBY for more like it.

More from KBY that goes with this script.

All scripts