Solved

Query users with CSVDE with an exclusion

Posted on 2006-07-06
6
2,053 Views
Last Modified: 2011-10-03
Hi,

I'm tryng to get a csv file that will contain all users with:

First Name+Last Name+Has a mailbox+Has a manager configured.
And I want to exclude all the diabled users from that query !

This is the way I can pull out all users that are not service accounts and also are not kind of wierd accounts like "test" users and so on.

I need the exact sysntax for CSVDE and also LDAP query in ADUC.

Thanx.
0
Comment
Question by:EERetUser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 26

Expert Comment

by:Pber
ID: 17062123
I'm not sure on CSVDE as I don't use that, but the ADUC query would be:

(&(&(objectCategory=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(homeMDB=*)(manager=*)))

0
 

Author Comment

by:EERetUser
ID: 17067283
Thanx,

This answers about the LDAP query but I need also to put it on a CSV with all coloumns.
So this list is filtered ok, but can't be shown.

So again, I need the CSVDE option so I can get the list.
0
 
LVL 26

Accepted Solution

by:
Pber earned 250 total points
ID: 17072326
Here's the csvde syntax:

csvde -p subtree -r "(&(objectCategory=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(homeMDB=*)(manager=*))" -l "givenname, sn" -f c:\users.csv

This will output output all enabled users with mailboxes and have a manager assigned.  It will only return the dn, lastname and firstname.  If you want it to return all attributes remote the -l option:

csvde -p subtree -r "(&(objectCategory=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(homeMDB=*)(manager=*))"  -f c:\users.csv

You can also just use the ""(&(objectCategory=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(homeMDB=*)(manager=*))"  query in ADUC as a custom query and then just Export list.

Hope that helps
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 26

Expert Comment

by:Pber
ID: 17103387
Were you able to get this working?
0
 

Author Comment

by:EERetUser
ID: 17104015
I'm on a training, This is the first thing I'll do when I come back.

Thanx.
0
 

Author Comment

by:EERetUser
ID: 17166167
Thanx, this did the job.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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