Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

Find ActiveSync User by Device ID or IMEI

$
0
0

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


Viewing all articles
Browse latest Browse all 36188

Trending Articles