Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Rules and regulations were devised in order to maintain the integrity of a system. However, interpretation of rules can be quite tricky.
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

810 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