Extracting information from active directory

active-directorydata-extraction

I work in the IT support department of a branch of a huge company.

I have to take care of a database with all the users, computers, etc. I'm trying to find a way to automatically update the database as much as possible, but the IT infrastructure guys doesn't give me enough privileges to use Active Directory in order to dump the users, nor they have the time to give me the information that I need.

Some days ago I found Active Directory explorer from Sysinternals that allows me to browse through Active Directory, and I found all the information that I need there (username, real name, date when it was created, privileges, company, etc.). Unfortunately I'm unable to export the data to a human readable format. I'm just able to take a snapshot of the whole database in a machine-readable format. Doing the snapshot takes hours and I'm afraid that the infrastructure guys won't like me doing entire snapshots on a regular basis.

Do you know of any tool (command-line is preferable) that would allow me to retrieve the values of the keys or export it to XML, CSV, etc?

Best Answer

Use the older command line tools for Active Directory to dump to CSV: http://support.microsoft.com/kb/298882

Or use the newer PowerShell suite to export into CSV, Excel, etc. If you aren't up on your Powershell syntax the PowerGUI tool is outstanding. http://www.powergui.org

Or use the not-too-old but not-too-new VBScript methods. Here is a sample VBScript that exports all properties from all users to Excel: http://gallery.technet.microsoft.com/scriptcenter/4d192f4d-2830-4a3e-9352-64a7e696a36e

Microsoft has tons of PowerShell and VBScript examples here: http://gallery.technet.microsoft.com/ScriptCenter/