Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-10-19
2
Medium Priority
?
354 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
[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
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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Invest in your employees with these five simple steps to improve employee engagement and retention.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

636 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