tags:

views:

400

answers:

1

I'm trying to get the mailbox count from an Exchange database by using the following query:

var n = database.Properties["homeMDBBL"].Count;

Where "database" is a DirectoryEntry pointing to an Exchange Database.

So far so good, but the count is always wrong. Say the real count of mailboxes on this database is 200, I only get 3 or 4 back. So it returns something, but not the real amount of homeMDBBL entries.

A: 

I found the answer in the mean time... in your LDAP path you have to connect to a specific Global Catalog server:

Does not return all mailboxes via homeMDBBL:

ldap://fully.qualified.domainname/CN=databasename,...

Properly returns all mailboxes:

ldap://globalcatalogname.fully.qualified.domainname/CN=databasename,...
Thomas Vochten