1. ldifde -f export.ldf -s Aserver (Where Aserver is your domain controller and export.ldf is the filename)
In theory you can export user accounts by just giving the filename, but I find you need the -s switch to connect to the server. (-s Aserver)
Type your ldifde commands in notepad, then save as a .bat file then execute your .bat file from DOS.
2. Adding filters with -r
Use the -r switch to filter your data, for example: the command to export only computer objects on a server called Aserver is:
ldifde -f ExportComputer.ldf -s Aserver -r "(objectclass=computer)"
Gradually add to your basic ldifde file, pay attention to the syntax e.g. "speech marks", commas
Exporting only the LDIFDE fields you want with -l (lower case L)
ldifde -f ExportUser.ldf -s Aserver -r "(objectclass=user)" -l "dn, cn, givenName, sn, department"