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.
Simply run the script in the Exchange Management Shell to produce the report in CSV format.
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 firstname.lastname@example.org -MailTo email@example.com -MailServer smtp.exchangeserverpro.net