Solved

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

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
If your app took Google’s lash recently, here are the 5 most likely reasons.
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.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

785 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