a little CSVDE question

Viewing 1 post (of 1 total)
  • Author
  • Avatar

    I’m trying to export some info from AD and am playing around with CSVDE switches. More importantly with -r switch.

    here’s an example. certain OU names have been omitted.

    C:>csvde -d “OU=IT,OU=****,OU=USERS,OU=***,OU=***,OU=US,OU=***,DC=*****,dc=
    net” -f test.csv -r “useraccountcontrol=512” -l “name, displayname, useraccountc
    ontrol, mail”

    ok so useraccountcontrol =512 means any Enabled account. however one of our network admins has the “password never expires” flag enabled on his account. Very secure, i know. But he’s my senior and i have no say over the matter. my question is, what is the correct syntax for the -r switch to output everything with matching useraccountcontrol=512 or useraccountcontrol=66048? I tried using AND/& but that means that all records MUST be 512 AND 66048 not records that ARE 512 and 66048. Hope i explained this correctly.

    Any help is appreciated. Google is not being a good friend right now.


    Found it. Sometimes it helps to write things out. Kinda makes you look at it differently. What i needed to use is the (|) “pipe”. kinda like this

    csvde -f c:AllDisabled.csv -r “(|(useraccountcontrol=514)(useraccountcontrol=546)(useraccountcontrol=66050))” -l “DN, objectclass, objectcategory, sn, givenName, sAMAccountName, useraccountcontrol”
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.