lidifde is the command you want. It's main use is
querying the directory and outputting to a file (you can
also take a file and dump it into the directory, be
extremely careful with this).
ldifde -r "(objectclass=printQueue") -l dn -f c:\file.txt
There are two things you should know before using this
command. First know that every object has an objectClass
attribute. That should be your first step in filtering
your search. To find what objectClasses an object has, I
would use adsiedit (available from the 2k cd support
tools).
The second is to know what attributes you want to look
at. the default behavior of ldifde is to dump all set
attributes, which can often be much more than you wan.
Also use adsiedit (or ldifde itself) to look at what
attributes you want.
-r "(objectclass=printQueue") is the filter command
-l dn limits the attributes
-f c:\file.txt is the file you are exporting the results
into