ActiveSync

Written by Sam McGeown on 8/2/2011
Published under
Recently I needed to report on the ActiveSync devices that were attached to our Exchange 2010 organisation, and which users they were accessing, and then export them to a CSV file. This is the script: $ActiveSyncDevices = @() ForEach ($Mailbox in Get-Mailbox –Server MBX01) { Get-ActiveSyncDeviceStatistics -Mailbox $Mailbox.Identity –ErrorAction SilentlyContinue | Select DeviceFriendlyName, Devicetype, DeviceUserAgent | ForEach-Object { $_ | Add-Member –MemberType NoteProperty -Name "MailboxIdentity" -value $Mailbox $ActiveSyncDevices += $_ } } $ActiveSyncDevices | Export-csv c:\Path\To\File.