User Tools

Site Tools


exchange:reporting:reporting_project

Exchange Storage Reconciliation

This began as a “I'll just whip this up” type of project, with the goal of being able to report on our Exchange server storage use by group/OU/user/server/mailbox store/etc…

Intended goals are/were:

  • Database definition and creation
  • Programmatic lookup of all exchange mailboxes in the Active Directory, based on CN
  • Programmatic calculation of mailbox storage size, based on CN - Note: Earlier I wrote “This is never going to happen…” - but after a little more research on the possibilities of WMI, it indeed has already happened.
  • Long-term: UTF-16 parse via Perl. Some names are not correctly displayed via non-unicode csvde output, and that shouldn't be the case. For instance, “CN=Mimi N~RDiaye”, this entry results in a blank insert, which is of course a duplicate and MySQL errors out on the remaining inserts. This is essentially done as well, the only two names which didn't work now do thanks to conversion to UTF-8 from “UTF-16”

So it looks like a random newline in the file will give bad results?

That's basically it.

To-do

Most important next step is cleanup of code and organizing it so it's easy for someone else to use. Blech.

The Setup

Database

I decided on MySQL simply because it is readily available and simple.

     Database Definition

LDAP Queries for Exchange Mailboxes

All queries should be as small as possible for the simple reason that doing so will ensure script readability, better portability if a different parsing engine should be desired, and easier changes to how specific parameters are exported/imported. More files with fewer columns, and more db insert steps, is definitely favored over a large monolithic export/import.

Notes on queries

Tools

Csvde has been chosen as the sole lookup utility in order to keep lookup output alike. Csvde has one major advantage over ldifde or dsquery/dsget, which is single-line output. For Csvde syntax and examples see the notes on LDAP queries above.

Mailbox Size calculation

There is no mailbox size calculation, and there probably never will be… Right- this is accomplished via WMI w/VBS.

Process

Basic Outline:

Windows:

All LDAP lookups are performed o

exchange/reporting/reporting_project.txt · Last modified: 2010/04/28 05:29 by ben