The following command needs a filter, but will get the information that's needed. Notably this will contain all activesync partnerships including those that are old and not used any more. To filter this information, only retrieve records that have last contacted the server in X days.
The other aspect of improvement is how to retrieve the usernames from the following list. This list gives the DN of the user, and if you need email addresses, then additional steps may be required.
Get-ActiveSyncDevice | Get-ActiveSyncDeviceStatistics | sort-object status, devicetype , lastsyncattempttime | ft FirstSyncTime ,LastPolicyUpdateTime ,LastSyncAttemptTime ,LastSuccessSync , DeviceType , DeviceID, DeviceAccessState, Identity –a
Additionally, with regard to that bug, make sure the "Automate Processing" value is set to AutoUpdate
Get-Mailbox -resultsize unlimited | Get-CalendarProcessing | Sort-Object AutomateProcessing | Select-Object Identity, AutomateProcessing | Export-Csv c:\CalUsers.csv