Recently I was asked whether I had any PowerShell scripts available for producing a simple report of the ActiveSync devices for an Exchange organization. I didn’t have a script at the time but was able to quickly put one together that did the job, though it was a little rough.

I’ve since updated the script to make it more functional and reliable, and I am releasing it here for the community to download and make use of as well.

This script is available for download on the TechNet Script Gallery or Github. Comments are welcome below. If you find a bug please consider raising it as an issue on Github.

Simply run the script in the Exchange Management Shell to produce the report in CSV format.

[PS] C:\Scripts>.\Get-EASDeviceReport.ps1 1 [ PS ] C : \ Scripts > . \ Get - EASDeviceReport . ps1

The report is written to a CSV file in the same folder that the script is located.

You can also send the CSV report via email, and specify an “age” in days for the last sync attempt of the device, for example to only report on devices that have not attempted sync in 30 days.

PS C:\Scripts> .\Get-EASDeviceReport.ps1 -Age 30 -SendEmail -MailFrom exchangeserver@exchangeserverpro.net -MailTo administrator@exchangeserverpro.net -MailServer smtp.exchangeserverpro.net 1 PS C : \ Scripts > . \ Get - EASDeviceReport . ps1 - Age 30 - SendEmail - MailFrom exchangeserver @ exchangeserverpro . net - MailTo administrator @ exchangeserverpro . net - MailServer smtp . exchangeserverpro . net

This script is available for download on the TechNet Script Gallery or Github. Comments are welcome below. If you find a bug please consider raising it as an issue on Github.