Finding ActiveSync devices and their associated users in Exchange 2010

Looks for all mailboxes that have activesync device partnerships and then displays device information from these mailboxes only along with the mailbox owners identity in an easy to read format which can be customized.


$ActiveSyncDevices = @()
$mbx = get-casmailbox | ?{$_.hasactivesyncdevicepartnership -eq $true}
ForEach ($Mailbox in $mbx) {
Get-ActiveSyncDeviceStatistics -Mailbox $Mailbox.Identity –ErrorAction SilentlyContinue | Select DeviceFriendlyName, Devicetype, DeviceModel, DeviceOS, DeviceUserAgent | ForEach-Object { $_ | Add-Member –MemberType NoteProperty -Name \"MailboxIdentity\" -value $Mailbox;
$ActiveSyncDevices += $_ }
}
$ActiveSyncDevices | select DeviceType, DeviceModel, DeviceOS, MailboxIdentity | ft

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *