Solved

Query users with CSVDE with an exclusion

Posted on 2006-07-06
6
2,045 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 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