Actually since homeMDB is linked you can use homeMDBBL which is an attribute
of the msExchPrivateMDB objects[1]. There will be an entry for every
connected mailbox for that store. Certainly that is about the fastest way to
gather the info[2]. You should be able to dump the counts for even large
orgs in seconds. If you want info about the connected users other than DN
don't forget you can use Attribute Scoped Queries[3]...

The alternate mechanism is as Brian mentions which is to use the
MicrosoftExchangeV2 WMI pieces to enumerate through the stores, this is
going to be far more expensive but will allow you to get the info for
disconnected mailboxes as well. Why Microsoft doesn't maintain that info in
AD too is beyond me. I guess they like making things complicated. :)

   joe


[1] This assumes visibility into the Exchange portion of the config
container... i.e. that you have Exchange View access... If you don't, you
can still get this info, you just have to look at the forward links as
mentioned previously.

[2] For Windows Server 2003, this should be pretty fast, maybe as fast as
using the backlinks depending on how good your code is. Theoretically the
speeds could be identical.... However, chances are if you are using
vbscript, it is going to be considerably slower as most people let vbscript
choose what attributs to return so they end up getting a ton of crap when
they need very little which takes time (and bits) on the wire to transfer.
If you used AdFind and just asked for DNs, the speed difference between
chasing the forward and back links should be neglible for 2003... Now for
Windows 2000 AD, there will be no competition, enumerating the backlinks
will be much faster than querying for the forward links. I admit, this is
something only larger companies really tend to think about because doing
some of these things can be unnecessarily slow doing it one way versus
another but in a smaller environment, the differences may not even be
noticeable. I think PowerShell is going t add a lot of fun here for
Exchange... Smaller environments will end up loving it, larger environments
probably not so much until we figure out how to hack around it. This is
nothing new though, I brought this up to the Exchange team a while ago and
challenged them to do a large scale test... 

[3] You should always query a GC for this homeMDBBL info (whether ASQ or
otherwise) unless you have a single domain or know for a fact that the
stores you are interested in only have users from the domain of the DC you
are querying. 




--
O'Reilly Active Directory Third Edition -
http://www.joeware.net/win/ad3e.htm 
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brian Desmond
Sent: Thursday, November 09, 2006 9:26 PM
To: [email protected]
Subject: RE: [ActiveDir] mailbox enumeration(OT)

I can think of a couple ways-

You can modify the script here to just count:
http://briandesmond.com/blog/archive/2006/09/04/Script-to-Dump-Exchange-
Mailbox-Info-to-Spreadsheet-_2800_CSV_2900_.aspx 

You can also query the config partition, specifically cn=microsoft
exchange,cn=services,dcn=configuration,dc=blah,dc=blech for whatever the
cass is for the mailstores, I think msExchPrivateStore or something
similar. Then just iterate each of those and search AD for
homeMDB=DnOfThat. 

Thanks,
Brian Desmond
[EMAIL PROTECTED]

c - 312.731.3132

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:ActiveDir-
> [EMAIL PROTECTED] On Behalf Of Tom Kern
> Sent: Thursday, November 09, 2006 8:58 PM
> To: activedirectory
> Subject: [ActiveDir] mailbox enumeration(OT)
> 
> Can anyone help me out with a script that will just query every
> exchange server and SG in the org and dump out the # of mailboxes on
> each store to a txt file?
> 
> The output is simple, just EX severname-SGname-store-#of mailboxes.
> 
> I can get the size of a mailbox or store but I can't seem to just
> query for # of mailboxes on a store and dump that to a text file.any
> example or suggestione would be appreciated.
> 
> Thanks
> List info   : http://www.activedir.org/List.aspx
> List FAQ    : http://www.activedir.org/ListFAQ.aspx
> List archive:
http://www.mail-archive.com/[email protected]/
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/[email protected]/

List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/[email protected]/

Reply via email to