Microsoft 365

Microsoft 365: Find and Show Active Sync Users

Active Sync allows users to connect their smartphone with Microsoft 365, respectively Exchange Online. Do you know which users have this feature enabled? If not, read on. I will give you a PowerShell one-liner to catch them all and save them for documenting purposes.

Connect to Microsoft 365 / Exchange Online

First we need to connect to our tenant. Run the commands below to open a PowerShell session to your Microsoft cloud.


Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber

Connect-ExchangeOnline -UserPrincipalName user@domain.com -ShowProgress $true

Fine. Let’s move on.

Retrieve all Active Sync enabled Users

This first one-liner shows all Active Sync enabled users. Note that this doesn’t mean they have an actively established connection, it only means they are allowed to use Active Sync. This setting can be configured in your Microsoft 365 portal.


Get-ExoCASMailbox -ResultSize Unlimited `
-Filter "Name -notlike '*Discovery*' -and ActiveSyncEnabled -eq $true" |
Select-Object DisplayName,ActiveSyncEnabled

Anmerkung 2020-05-25 154115

Next objective is to show all users that have an active device partnership via Active Sync. This applies to devices and users that can be controlled with Microsoft 365.


Get-ExoCASMailbox -ResultSize Unlimited -PropertySets ActiveSync `
-Filter "HasActiveSyncDevicePartnership -eq $true" |
Select-Object DisplayName,ActiveSyncEnabled,HasActiveSyncDevicePartnership

Fine, that’s it. Now you have an overview who is using Active Sync.

See also

Microsoft 365: Show Mailboxes that have Auto-Reply enabled

Microsoft 365: Add User Accounts and Mailboxes with PowerShell

 

1 reply »

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.