How to Tell Which Users Have an ActiveSync Partnership

Wednesday, December 12, 2007
It's always good to know who is using the technology we support. I have a customer who needed to know which users were utilizing Windows Mobile devices to access their Exchange servers.

Here's a one-liner PowerShell command that reports which users have ActiveSync partnerships configured in Exchange 2007:
Get-CASMailbox WHERE {$_.HasActiveSyncDevicePartnership} SELECT identity
In Exchange 2003, it's not quite that simple. The ActiveSync partnership is stored in a hidden folder within the user's Exchange mailbox. This folder can be exposed using mfcmapi (the Microsoft Exchange Server MAPI Editor).

Mailboxes do not have the hidden Microsoft-Server-ActiveSync folder by default. Once an ActiveSync partnership has been configured from the user's Windows Mobile device, the following folder structure is created under the Root Container:


Note that PocketPC may show as SmartPhone, depending on the device used.

While mfcmapi can view the Root Container structure for an individual maibox, this is not feasible for a multi-user enterprise. I contacted Microsoft PSS for a solution, but they said there was no way to do this programmatically. Fortunately, I found this excellent VBscript written by Glen Scales that does exactly what I was looking for.

Here's an example of the output that the script produces:


Viola! Just what the doctor ordered!

3 comments:

  1. This is just what I needed. Thanks

    ReplyDelete
  2. For Exchange 2007 SP1 i had to use the below command:

    Get-CASMailbox | WHERE{$_.HasActiveSyncDevicePartnership} | SELECT Identity

    The command in this article was missing the " | " which i guess are now required for SP1.

    Cheers,
    Marc

    ReplyDelete
  3. updated link for the script...
    http://msgdev.mvps.org/exdevblog/showasyncv3.zip
    or, link to that blog..
    http://gsexdev.blogspot.com/2006/09/enumerating-devices-registered-via.html

    ReplyDelete

Thank you for your comment! It is my hope that you find the information here useful. Let others know if this post helped you out, or if you have a comment or further information.