Find ActiveSync User by Device ID or IMEI
Have you ever needed to find out which user is using a given mobile device and all you have is the Device ID or IMEI code? The other way around is very simple but doesn’t really solve the problem.
I put together the following piece of code to simplify the operation:
$Mailboxes = Get-CASMailbox -ResultSize Unlimited | Where {$_.HasActiveSyncDevicePartnership -eq $True }
$User = $Mailboxes | %{Get-ActiveSyncDeviceStatistics -Mailbox $_.Identity} | `?{$_.DeviceImei -like "0123456789ABCDEF"}
$User | fl Mailbox, DeviceType
You can of course substitute $_.DeviceImei with $_.DeviceId if that’s what you’re looking for.
Enjoy :)
Comments
- Anonymous
March 06, 2014
Not working ... - Anonymous
October 26, 2014
gave only the devicetype - Anonymous
January 18, 2016
Or even..
Get-ActiveSyncDevice | where {$_.deviceImei -like "01234567890ABCDEF"} - Anonymous
January 18, 2016
Or even..
Get-ActiveSyncDevice | where {$_.deviceImei -like "01234567890ABCDEF"}