Solved

Need to tweak CSVDE AD extract

Posted on 2012-04-06
3
807 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
Resolve DNS query failed errors for Exchange
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 to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now