This post is also available in: Polish
In Exchange Server environment where is a limit of ActiveSync partnership with mailbox.
When you reach this limit then you won’t be able to connect any new devices to the mailbox.
This limit is set in ThrottlingPolicy using parameter EASMaxDevices
To check current setting of EASMaxDevices, open Exchange Management Shell and run:
Get-ThrottlingPolicy | select name, EASMaxDevices, EASMaxConcurrency
As a result you will get all ThrottlingPolicies available in Exchange environment and how many mobile devices can you connect to the mailbox, and also using EASMaxConcurrency you will see how many connections in one time can be accepted to the mailbox.
Now you can check mailbox which ThrottlingPolicy is connected to mailbox:
Get-Mailbox jsmith | select throttlingpolicy
All of those informations will be needed in below script.
This script checks how many mobile devices has partnership with each mailbox and how many of them were not connected since 30 days ($Days)
Set-AdServerSettings -ViewEntireForest $True Function New-Array {,$args} $Report = new-array $Days = 30 $MAX_Devices = 10 $casmbxs = Get-CASMailbox -resultsize unlimited | ?{($_.HasActiveSyncDevicePartnership -eq $true) -AND ($_.name -notlike “cas_*”) -AND ($_.name -notlike “DiscoverysearchMailbox*”) -and $_.Exchangeversion -like "0.10 (14.0.100.0)"} foreach ($casmbx in $casmbxs){ $PrimarySMTPAddress = $([string]$casmbx.PrimarySMTPAddress) $devices = get-activesyncdevicestatistics -mailbox $PrimarySMTPAddress $devicesOLD = $devices | ?{$_.LastSuccessSync -lt (Get-Date).AddDays(-$Days)} $device = New-Object System.Object $device | Add-Member -type NoteProperty -name Mailbox -value $($casmbx.name) $device | Add-Member -type NoteProperty -name SMTPAddress -value $PrimarySMTPAddress $device | Add-Member -type NoteProperty -name Devices -value $($devices.count) $device | Add-Member -type NoteProperty -name DevicesOLD -value $($devicesOLD.count) $Report += $device }
As a result of this script you will get $Report object which will include information about:
- Mailbox – Display Name of mailbox
- SMTPAddress – email address
- Devices – count partnership mobile devices for this mailbox
- DevicesOLD – count partnership mobile devices not connected since 30 days
To get list of mailboxes which has connected more mobile devices than $MAX_Devices use below command:
$Report | where-object {$_.devices -gt $MAX_Devices}
When you want to find 30 mailboxes with the highest amount of mobile devices not connected since 30 days then use below command:
$Report | sort DevicesOLD -desc | select -first 30