Karsten Palmvig's blog

Notes from the field on Office 365...

Find ActiveSync User by Device ID or IMEI

Find ActiveSync User by Device ID or IMEI

  • Comments 2
  • Likes

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 :)

  • Not working ...

  • gave only the devicetype

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment