Get the number of ActiveSync devices per user 4

Exchange ActiveSyncSince Exchange 2010 SP1, the default maximum of ActiveSync devices per user is set to 10. Although this seems rather much for a single user, a user who has multiple phones, uses Windows 8 tiles, tablets etc. can reach this maximum pretty easily.

ActiveSync Settings

ActiveSync settings are applied through a throttling policy. These settings determine the amount of resources that can be used by ActiveSync processes. You can retrieve your current throttling policy settings by running the following command in Exchange Management Shell: Get-ThrottlingPolicy

The settings for ActiveSync all start with EAS. The settings available are: EASMaxConcurrency, EASPercentTimeInAD, EASPercentTimeInCAS, EASPercentTimeInMailboxRPC, EASMaxDevices, EASMaxDeviceDeletesPerMonth

To change the number of ActiveSync devices there are 2 settings you can adjust:

EasMaxDevices:  limits the maximum number of active EAS partnerships per user.

EasMaxConcurrency:  limits the maximum number of concurrent devices at one time.

Get ActiveSync Devices per user script

Here is a simple powershell script which will look at all the CAS mailboxes, retrieve the ActiveSync device partnerships and show the number of partnerships per user. The output is as follows on screen:

  1. Full Name of the user
  2. Identity of the user
  3. Number of ActiveSync devices / partnerships of the user

You can easily adjust this script to output it to CSV file. If you have an improved version of the script or suggestions, please let me know.

$devices = @()
$mailboxes = Get-CASMailbox -ResultSize:Unlimited | Where-Object {$_.HasActiveSyncDevicePartnership -eq $true}
foreach ($m in $mailboxes) 
    $username = $m.Name
    $useridentity = $m.Identity
    $devices = Get-ActiveSyncDeviceStatistics -Mailbox $m.Identity
    if ($devices -is [system.array]) 
	    $numberofdevices = $devices.length
    } else {
	if ($devices)
			$numberofdevices = 1
		} else {
			$numberofdevices = 0
    write-host "$username; $useridentity; $numberofdevices"

Hans Sleurink

Hans Sleurink works as a Consultant at Wortell in the Netherlands where he designs and deploys Unified Communications solutions. His main focus is on, but not limited to, Microsoft Teams (migrations), including Enterprise Voice, contact center solutions, AudioCodes, Direct Routing, Exchange, Office 365, Active Directory and other UC related topics.

More Posts - Website

Follow Me:

4 thoughts on “Get the number of ActiveSync devices per user

  1. Reply Rajesh Gowda Jun 12,2013 04:59

    I was looking for it.
    I will try now

    Thanks a ton!

  2. Reply Zoyet Jan 16,2014 10:16

    $EASMailboxes = Get-CASMailbox -Filter {HasActiveSyncDevicePartnership -eq $True -and DisplayName -notlike “CAS_{*”} | Get-Mailbox

    $EASMailboxes | Select-Object SamAccountName, DisplayName, PrimarySMTPAddress, @{Name=”EASDeviceCount”;Expression={(Get-ActiveSyncDevice -Mailbox $_.Identity).Count}} | Export-CSV .EASMailboxes.csv -NoTypeInformation

  3. Reply Shyam2020s Mar 28,2015 14:57

    if ($devices -is [system.array])
    I couldn’t understand the above line . Could you please help
    Thanks in advance.

  4. Reply Florent Aug 26,2015 15:31


    I am quite new to powershell. How do you export this to a CSV file please?


Leave a Reply




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