Using PowerShell in Exchange 2010 to export ActiveSync Device Partnerships to a csv file

Hi all,

In this blog I wanted to make you aware of a quick and easy way to get a list of all your ActiveSync Device Partnerships displayed nicely in csv file. This will give you lots of useful information including but not limited the device models, associated users, iOS versions, last successful sync times etc… It’s a good way to get a look into what is connecting via ActiveSync and take inventory.

All you need to do is open up the Exchange Management Shell and issue the 2 commands listed below. This will retrieve all the information and put in a csv file in the root of the c drive call “ASDdevice.csv”.

The Commands

$Devices=Get-CASMailbox -ResultSize unlimited -filter {HasActivesyncDevicePartnership -eq $True}

$Devices | % {Get-ActiveSyncDeviceStatistics -Mailbox $_.identity} | Export-Csv c:\ASDevices.csv –NoTypeInformation

Once the commands are complete you can open them up in Excel for a nicely formatted Activesync Device Inventory to sort and clean it up accordingly.

I hope this helps. As always, if you have a question or feedback please leave a comment.

Related Links:

TroubleshoTroubleshooting ActiveSync in Exchange 2010 using PowerShell and the Export-ActiveSynclog cmdlet

Leave a Reply

Your email address will not be published. Required fields are marked *