Paul Bergson wrote this brilliant script that queries active directory and gives you a wealth of information that can be used to audit active directory.
I have slightly modified this script and added a few lines to get information like the email address and the exchange home server of the user using the mail and msExchHomeServerName attributes.
You can download the modified script here.
How the script works:
It queries Active Directory using LDAP for a bunch of known user attributes and writes them to a .csv file in the same directory as the script. The file is will be named yyyymmdd_audit.csv
NOTE: I am NOT the original author of this script. Please give all credit to Paul Bergson who is an MVP for Directory Services.
Related posts:
#1 by William Morris on May 21, 2009 - 7:06 AM
Thanks for the script.
Alternatively, active directiory audits can be done with some 3rd party solutions.
I use active administrator to do auditing that I was unable to get with any known scripts.
I just upgraded to newest release (version 5.1) which has some great enhancements in both features and usability.