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:
So it looks like a random newline in the file will give bad results?
That's basically it.
Most important next step is cleanup of code and organizing it so it's easy for someone else to use. Blech.
I decided on MySQL simply because it is readily available and simple.
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.
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.
There is no mailbox size calculation, and there probably never will be… Right- this is accomplished via WMI w/VBS.
Basic Outline:
Windows:
All LDAP lookups are performed o