Solved

Need to tweak CSVDE AD extract

Posted on 2012-04-06
3
809 Views
Last Modified: 2012-06-21
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!
0
Comment
Question by:OGSan
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
Anuroopsundd earned 500 total points
ID: 37818201
CSVDE -f "c:\test.csv" -r "(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))"  -l objectClass,sn,givenName,displayName,description,employeeID,sAMAccountName,mail
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37818206
http://www.tek-tips.com/faqs.cfm?fid=5667  have more information about the values that can be used...
0
 
LVL 1

Author Comment

by:OGSan
ID: 37818216
Holy crap!  That was outstanding!  Thanks for that link, too, Anuroopsundd.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article runs through the process of deploying a single EXE application selectively to a group of user.
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question