Solved

Query users with CSVDE with an exclusion

Posted on 2006-07-06
6
2,034 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
  • 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

808 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