GET-IT: TEAMS DAY | 1-Day Free Virtual Conference all about Teams. Here on Petri.com - 8/12/20 GET-IT: TEAMS DAY - 8/12/20

a little CSVDE question

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    IceNine
    Member
    #143016

    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.

    Code:
    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.

    Ice

    ***Update***
    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

    Code:
    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.