Solved

Query users with CSVDE with an exclusion

Posted on 2006-07-06
6
2,062 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

631 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