Exchange Activesync Powershell

kingcastle used Ask the Experts™
I just found this script online that will tell me almost everything i need to know about my exchange 2010 activesync connections. the only thing i am missing the lastsuccesssync parameter.
I have pasted the bit of the script that seems to deal with the device parameters and was hoping someone could tell me what i need to add to make it give lastsuccesssync as well.

####  Get Mailbox

$EASDevices = “”
$AllEASDevices = @()

$EASDevices = ”| select ‘User’,'DeviceType’,'DeviceModel’,'DeviceOS’
$EasMailboxes = Get-Mailbox
foreach ($EASUser in $EasMailboxes) {
$EASDevices.user = $EASUser.displayname
    foreach ($EASUserDevices in Get-ActiveSyncDevice -Mailbox $EasUser.alias) {
    $EASDevices.devicetype = $EASUserDevices.devicetype
    $EASDevices.devicemodel = $EASUserDevices.devicemodel
    $EASDevices.deviceos = $EASUserDevices.deviceos
    $AllEASDevices += $EASDevices | select user,devicetype,devicemodel,deviceos
$AllEASDevices = $AllEASDevices | sort user
$AllEASDevices | Export-Csv $exportpath\ActiveSyncReport.csv


Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David CarrMessaging Administrator

LastSuccessSync is a property of Get-ActiveSyncDevicesStatistics and is only available in Exchange Server 2010

Try the following code
Get-ActiveSyncDeviceStatistics $_.Identity -ErrorAction SilentlyContinue | Select DeviceType,DeviceID,DeviceModel,DeviceFriendlyName,LastSuccessSync,@{Name='User';Expression={$UserName}}

See more at


Yeah we are on exchange 2010 alright.
tried your command and nothing happens EMS just moves onto next line.
David CarrMessaging Administrator

Correction. Get-ActiveSyncDeviceStatistics is not a 2010 only cmdlet. Sorry about that.

Pick a user and run the following:

Get-ActiveSyncDeviceStatistics -mailbox alias | select DeviceType, LastSuccessSync

You should see outuput like the following:

DeviceType                                    LastSuccessSync
----------                                            ---------------
BlackBerry                                     1/31/2013 1:23:31 PM
TestActiveSyncConnectivity         1/24/2013 1:28:02 PM

the link I posted above has the complete script that  you can reference. Sorry I was not clear.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


grand i can get that bit but how would i incorporate the LastSuccessSync into the original script i pasted above?
David CarrMessaging Administrator

Is that the entire script or a snippet?


snippet you can see entire script at the site i found would you like me to post the link?

its by adn its called

How to Get a Report of Active Sync Devices in Exchange 2010/Exchange 2013
no update


No further comment

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial