No announcement yet.

a little CSVDE question

  • Filter
  • Time
  • Show
Clear All
new posts

  • a little CSVDE question

    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"
    Last edited by IceNine; 9th July 2009, 22:48. Reason: Posting Solution

  • #2
    Re: a little CSVDE question

    Hi there... well I just want to give you a quick tip.. look at a more powerful tool... check out ADFind from the great Joe Richards
    I love LDIFDE/CSVDE but c'mon... ADFind/ADMod can do LOTS more!


    • #3
      Re: a little CSVDE question

      man i just got used to the csvde and ldifde commands, now i gotta learn new ones. lol

      thanks for the tool though. Will definitely take a look at it.