Solved

How do you write an "OR" instead of a "AND" in a CSVDE script..

Posted on 2004-10-19
2
337 Views
Last Modified: 2008-02-01
I have written the following script:

CSVDE -v -f C:\SCRIPT\OUTPUT\Userlist.csv -s APIOAPP1 -d "dc=DOMAIN,dc=COM" -p subtree -r "(&(objectCategory=person)(givenName=*)(mail=*)(userAccountControl=66048))" -l "company,sn,givenName,DisplayName,mail,mailNickname"

The current script works great for returning information that (userAccountControl=66049).  What I would like to do is create a "Or" statement in which user(AccountControl=66048 or 512).  What is the syntax in order to return the data?
0
Comment
Question by:dflynn21
2 Comments
 
LVL 19

Expert Comment

by:billmercer
ID: 12353902
I don't think you can do this with a single command. You could make a batch file that runs the two consecutive commands and then concatenates the results.  
0
 
LVL 4

Accepted Solution

by:
Beldoran earned 500 total points
ID: 12366743
Try

CSVDE -v -f C:\SCRIPT\OUTPUT\Userlist.csv -s APIOAPP1 -d "dc=DOMAIN,dc=COM" -p subtree -r "(&(objectCategory=person)(givenName=*)(mail=*)(|(AccountControl=66048)(AccountControl=512)))" -l "company,sn,givenName,DisplayName,mail,mailNickname"

note the use of the 'pipe' or '|' character which means or

(|(AccountControl=66048)(AccountControl=512))

Hope this helps
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
Let’s list some of the technologies that enable smooth teleworking. 
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

762 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

23 Experts available now in Live!

Get 1:1 Help Now