Script to see ActiveSync Device Statistics from a filtered Mailbox List.

Scenario: Customer wants to a list of all users with active mobile devices so they can see lastsuccesssync, devicepolicyapplied, etc of the devices
$Mailboxes = Get-CasMailbox -Filter {HasActiveSyncDevicePartnership -eq $True -and -not displayname -like “CAS_{*” -and -not displayname -like “Extest_*”} –ResultSize Unlimited
$Devices = $Mailboxes | %{Get-ActiveSyncDeviceStatistics –Mailbox $_.Identity}

$Devices | Export-CSV -Path C:scriptstest.csv

Leave a comment