Link to home
Start Free TrialLog in
Avatar of OGSan
OGSanFlag for United States of America

asked on

Need to tweak CSVDE AD extract

Hi, Experts -
I need to tweak the following CSVDE utility code so that it only pulls the OU=Service Accounts...OR...if it can ignore OU=Disabled Accounts that would be just as good if not better.

I don't know what the syntax is though and nothing I try seems to work for me.

Here is the existing/working code that is pulling ALL accounts - I need to change this to pull only the Service Accounts, or to ignore the Disabled Accounts:
csvde.exe -f ADHT_Export.csv -b LDAP_query DDDD XXXXXX -s ad.company.com -v -r 
"(&(objectClass=user)(sn=*))" -l objectClass,sn,givenName,displayName,description,employeeID,sAMAccountName,mail

Open in new window

Many thanks for your help!
ASKER CERTIFIED SOLUTION
Avatar of Anuroopsundd
Anuroopsundd
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
http://www.tek-tips.com/faqs.cfm?fid=5667  have more information about the values that can be used...
Avatar of OGSan

ASKER

Holy crap!  That was outstanding!  Thanks for that link, too, Anuroopsundd.