While working heavily in Active Directory in previous jobs, I came across a very simple and useful tool that can be used to pull information from AD – this tool is called CSVDE (stands for Comma Separated Value Data Exchange). Whether you need some quick information about a few user accounts or thousands of computer objects, CSVDE will prove useful in no time.
My first experience with the CSVDE tool was when I had a task to create a list of all disabled users in Active Directory. In a company with hundreds or thousands of user accounts, it might prove beneficial to have some sort of tool or script built, that would help with this task. Instead of trying to make my own script to do this, I did a quick Google search and came across the built-in tool. CSVDE is extremely useful whether you are trying to gather information or even import AD information to another domain. It is built into Windows 2008 and can easily be installed with the AD DS server role (you’ll find it under the C:\Windows\System32 folder). It can also run under the other Windows Server OSes – 2003/R2, 2008/R2, and 2012.
…so once I ensured that the csvde program was already installed, I got my command prompt up and running, and navigated into the directory (command is ‘cd c:\windows\system32’). By default, CSVDE will export, unless you specify the import parameter (-i). So to quickly get a list of all users and computers into a .csv file on my server, I would simply run ‘csvde.exe -f c:\adinfo.csv’. This will export all of the Active Directory information into a comma separated value under my C:\ drive. I’ll be going into more detail in a future video series (yes, I’m planning to start mini tutorials via YouTube…hopefully they help out some people). You can export specific parts of a user or computer object by using the delimiter parameter (-d), which will make it much easier/cleaner to read. Another quick tip is to have Excel installed when opening the .csv file…I tend to find it easier to read with Excel versus Notepad.