Skip navigation

Q. How can I create a file that contains a list of all objects in a domain?

A. You can use the Csvde utility, which is included in Windows Server 2003 and Windows 2000 Server, to create a comma-separated value (CSV) file that lists all objects in a domain. For example, to list all objects in the demo.local domain, you'd run the command

csvde -d "dc=demo,dc=local" -f domain.csv

The -d parameter specifies the root of the distinguished name (DN) from which to start the output to the .csv file, and the -f parameter provides the output filename. Running this command displays the following messages on screen:

Connecting to "(null)"
Logging in as current user using SSPI
Exporting directory to file domain.csv
Searching for entries...
Writing out entries
.........................................
.........................................
.........................................
Export Completed. Post-processing in progress...
201 entries exported

The command has completed successfully.

You can easily refine Csvde's output further. For example, let's say you want to create a file that contains a list of the domain's organizational units (OUs). To do so, you'd run the command

csvde -d "dc=demo,dc=local" -f ous.csv
   -r"(objectClass=organizationalUnit)"

(The command wraps to two lines here because of space constraints.) Notice that the command is the same as in the previous example, except that the output filename is different and the command includes the -r parameter. The -r parameter creates a Lightweight Directory Access Protocol (LDAP) search filter so that the output will include only objects of class organizationalUnit.

The .csv file that Csvde creates typically contains a large amount of data that's relevant to the domain's objects (230 attributes in total). You can load the Csvde utility's output into a Microsoft Office Excel spreadsheet to view it more easily.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish