There are a bunch of tools around to get information about devices that are in use via Active sync such as the ActiveSync administration tool and also this method of using the logs that was blogged about on the Exchange Team blog. But if your after another method of enumerating all the devices in all mailboxes on a server here's something that might help out. The script works by using WebDAV and the Exadmin virtual directory (which means you won’t need full rights to everybody’s mailbox to run this script just delegated Exchange administration rights). To work out what path to use the script first queries for the default recipient policy in a domain and retrieves the default SMTP address within that policy. This is used to build the path for the Exadmin virtual directory. Another ADSI query then queries for all mailboxes on a server and then feeds the name of these mailboxes into a function those queries for the ActiveSync folder within each mailbox. The script first searches the...
Pushing the Envelope in Messaging and Office 365 Development