Solved

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

Posted on 2004-10-19
2
345 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
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.
Viewers will learn how to use the Hootsuite Dashboard.

860 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