Re: count users on database / store script

From: Dan Townsend [MSFT] (dtown_at_online.microsoft.com)
Date: 02/25/04


Date: Wed, 25 Feb 2004 13:40:04 -0600

Via Exchange System Manager - Expand mailbox store - mailboxes - Right
click - Export List - Open with Excel and scroll to the bottom for the
total - subtract one for the header.

Otherwise you could do a ldap search based on the mailbox store (homemdb) if
you want a more scripted approach.

You could have a bat file the runs the search and then pipe it to the find
command and search on "entries exported" and have that go to a file.

echo %date% >> log.txt
echo store a >> log.txt
ldifde -f something.ldf -p subtree -r (homemdb=dn of that mdb) | find
"entries exported" >>log.txt
del something.ldf
echo store b >> log.txt
ldifde -f something.ldf -p subtree -r (homemdb=dn of that mdb) | find
"entries exported" >>log.txt
del something.ldf

echo store c >> log.txt
ldifde -f something.ldf -p subtree -r (homemdb=dn of that mdb) | find
"entries exported" >>log.txt
del something.ldf

echo store d >> log.txt
ldifde -f something.ldf -p subtree -r (homemdb=dn of that mdb) | find
"entries exported" >>log.txt
del something.ldf
del ldif.log

You will likely need to add objectclass=user if you get slightly higher than
expected results.

-- 
Hope that helps,
Dan Townsend
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email to this address, post a reply to this newsgroup.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Rich Nahra" <nahrar@ccf.org> wrote in message
news:173d01c3fbca$031ca3c0$a001280a@phx.gbl...
> Greetings.
>
> I work for a large enterprise with several exchange
> servers, each server has 2 storage groups, and each
> storage group has 3 databases.  I need a script that will
> produce a CSV with total number of mailboxes on each
> database.  I eventually will post this information on our
> intranet using a data binding table.  Can anyone help get
> me started on producing such a script?
>
> Thanks In Advance.
> Rich Nahra
>


Relevant Pages

  • RE: MS Exchange Error
    ... Event Source: MSExchangeIS Mailbox Store ... Enable full-text indexing for the information store that is being ...
    (microsoft.public.windows.server.sbs)
  • Re: Online restore dismounts production mailbox store
    ... store dismounts. ... Mailbox Store Name: Mailbox Store ... Event Source:   MSExchangeSA ... Microsoft Exchange Server computer failed. ...
    (microsoft.public.exchange.admin)
  • Re: Mailbox Move
    ... Try restarting your info store. ... I'm migrating users from one Exchange 2003 SP2 server to another Exchange ... However when you look at the mailbox store on the original server ...
    (microsoft.public.exchange.admin)
  • Re: changing the exchange structure
    ... mailboxes on a single storage group and a single mailbox store. ... configuration with larger drives to increase storage space. ...
    (microsoft.public.exchange.design)
  • Re: unknown error 12029
    ... I set the local public store to the default store and tried to restart ... I think it would be better to dismount the mailbox store and public ... > remote public folder store as its default public store. ...
    (microsoft.public.exchange.admin)