Mike, Thanks I will give it a go later, I always seem to forget about ADfind.
ADfind is a bit like a potato - you can do so many different things with it. Regards Mark Parris Base IT Ltd Active Directory Consultancy Tel +44(0)7801 690596 -----Original Message----- From: "Mike Newell" <[EMAIL PROTECTED]> Date: Thu, 14 Sep 2006 07:55:52 To:<ActiveDir@mail.activedir.org> Subject: RE: [ActiveDir] CSVDE Export Hey, Don't know why csvde would change the order but try adfind from www.joeware.net. So far for me, it's always kept the fields in the order that I list them in the query. Below gets just the user accounts in the OU. If you want everything in the OU remove the -f (&(objectcategory=person)) reference. adfind -csv -nodn -b OU=User Accounts,OU=Office,OU=Company,DC=abc,DC=defghi,DC=inet -f "(&(objectcategory=person))" name mail givenname sn userprincip alname physicaldeliveryofficename > filename.csv ________________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Parris Sent: Thursday, September 14, 2006 6:02 AM To: ActiveDir@mail.activedir.org Subject: [ActiveDir] CSVDE Export Morning, I am using csvde to create a CSV file for importing into another system and this runs (CRONS - say no more) on regular basis. the syntax is csvde -f accusers.csv -d "OU=User Accounts,OU=Office,OU=Company,DC=abc,DC=defghi,DC=inet" -l "name,mail,givenName,sn,userprincipalname,physicalDeliveryOfficeName" on occasions the fields come out as listed and other times they are in a different order. I would like them to be consistent at all times. Does anyone know why they shuffle? Am I missing a flag or is there a better utility to create CSV files many thanks mark This message and any attachments (the "Message") may contain confidential, proprietary and/or privileged information and are only for their intended recipient(s). If you are not the intended recipient, you should notify the sender and delete the Message. E-mail transmissions cannot be guaranteed to be secure or error-free. This Message is provided for information purposes and should not be construed as a solicitation or offer to buy or sell any securities or financial instruments, or to provide investment advice in any jurisdiction where the sender is not properly licensed or permitted to do so. This Message is subject to additional conditions and restrictions. Please read them here: http://legal.dimensional.com/email/ List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.activedir.org/ml/threads.aspx