Not too long ago I wrote a quick post on how easy it is to gather information from AD. As a case in point example I provided a script to gather all the disabled user accounts which are still assigned Lync IDs. In this script I take it one step further and provide a full blown Active Directory reporting script which can be produced with any non-privileged domain user account.

Version Information

1.8 - 02/28/2014

1.7 - 02/19/2014

1.6.1 - 01/15/2014

1.6 - 01/10/2014

1.5 - 11/26/2013

1.4.0 - 11/21/2013

1.3.0: 11/17/2013

1.2.0: 11/10/2013

1.1.0: 11/02/2013

1.0.1: 10/23/2013

1.0.0: 10/20/2013


To create the output I repurposed my server asset reporting script. This means several output methods are baked right in.

*New* I've wrapped the entire script up in one easy to use set of parameters which includes the most common output formats and types of reports you may want to create. All of the prior reporting formats are still available to those who are determined though (I've setup custom sections you can use just for such a purpose). There is also an option for prompting at the console for all of the optional output such as the diagrams and user data exports.

Optionally, three diagrams can be created when this script is run. One for domain trusts, another for site replication connections, and a third for site adjacencies. By default the diagram source text file and a png file will get created in the directory which you run the script. 

To actually generate the diagrams you will need graphviz’s dot.exe executable which can be downloaded and installed here. Or here is a portable version of the application you can try utilizing. All you need is for the dot.exe file to work correctly to generate your diagram. You may have to modify this script to use the appropriate path to the executable if you use the portable version of graphviz.

Report Data

I’ve included only items which can be gathered from Active Directory with a regular user account and without any special AD modules. This is what has been added thus far:

Forest Level Audit Report

Domain Level Audit Report


Here are some screenshots of the reports and diagrams which can be created: