Results 1 to 5 of 5

Thread: Need CSVDE to dump user group memberships

  1. #1
    Spin Guest

    Need CSVDE to dump user group memberships

    Gurus,

    How can I make a csvde -f > filename.txt dump the group membership of each
    user along with the other default data?

    --
    Spin



  2. #2
    Al Dunbar Guest

    Re: Need CSVDE to dump user group memberships


    "Spin" <Spin@spin.com> wrote in message
    news:42spglF1kqfijU1@individual.net...
    > Gurus,
    >
    > How can I make a csvde -f > filename.txt dump the group membership of each
    > user along with the other default data?


    I don't think it can be done in that way. You might try running csvde to
    dump information about the groups, including the "members" attribute. But
    even in a native active directory membership this will show only direct
    members, not those whose membership derives from nesting of security groups.

    /Al



  3. #3
    Richard Mueller Guest

    Re: Need CSVDE to dump user group memberships

    Spin wrote:

    > How can I make a csvde -f > filename.txt dump the group membership of each
    > user along with the other default data?


    Hi,

    Use -l followed by a list of the attributes desired. For example:

    csvde -f output.txt -l memberOf

    However, only the attributes listed are displayed. This does not add to the
    default list.

    --
    Richard
    Microsoft MVP Scripting and ADSI
    Hilltop Lab - http://www.rlmueller.net



  4. #4
    Spin Guest

    Re: Need CSVDE to dump user group memberships

    Sweet. Anyway to get it to not include all that "CN=" stuff in the output?

    --
    Spin

    "Richard Mueller" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in message
    news:eLmH1GTGGHA.2876@TK2MSFTNGP10.phx.gbl...
    > Spin wrote:
    >
    >> How can I make a csvde -f > filename.txt dump the group membership of
    >> each user along with the other default data?

    >
    > Hi,
    >
    > Use -l followed by a list of the attributes desired. For example:
    >
    > csvde -f output.txt -l memberOf
    >
    > However, only the attributes listed are displayed. This does not add to
    > the default list.
    >
    > --
    > Richard
    > Microsoft MVP Scripting and ADSI
    > Hilltop Lab - http://www.rlmueller.net
    >




  5. #5
    Richard Mueller Guest

    Re: Need CSVDE to dump user group memberships

    No. The csvde command always outputs the DN (Distinguished Name) of the
    user. The memberOf attribute is a collection of group DN's. You probably
    want the NetBIOS names of the groups (the sAMAccountName or NT Name), but no
    attribute of the user object has this. You would have to run a VBScript
    program to convert the DN's to NetBIOS names.

    Someone expert in batch programs might know a way to extract the Common
    Names from the DN's in the output. However, the Common Name of a group (or
    user) does not have to match the NetBIOS name, although they almost always
    match for groups.

    Also, as Al pointed out, the memberOf attribute only exposes direct group
    membership. It does not reveal nested group membership. (Jack is a member of
    group "Grade8", which in turn is a member of group "School", for example).
    Also, the "Primary" group of the user is not included (almost always "Domain
    Users").

    A VBScript program that displays the group memberships for one specified
    user is linked here:

    http://www.rlmueller.net/List%20User%20Groups.htm

    This program reveals nested group memberships, but not the "Primary" group.
    As written, this program outputs the DN's of the groups. It can be modified
    to output the NetBIOS names of the groups by replacing the following line
    (in 2 places):

    Wscript.Echo objGroup.distinguishedName

    with the following:

    Wscript.Echo objGroup.sAMAccountName

    The program accepts the DN of the user as a parameter. Much more work would
    be required if you wanted to use the sAMAccountName (NT name, also called
    the "pre-Windows 2000 logon name") of the user instead.

    --
    Richard
    Microsoft MVP Scripting and ADSI
    Hilltop Lab - http://www.rlmueller.net

    "Spin" <Spin@spin.com> wrote in message
    news:435a0sF1l2qbbU1@individual.net...
    > Sweet. Anyway to get it to not include all that "CN=" stuff in the
    > output?
    >
    > --
    > Spin
    >
    > "Richard Mueller" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in message
    > news:eLmH1GTGGHA.2876@TK2MSFTNGP10.phx.gbl...
    >> Spin wrote:
    >>
    >>> How can I make a csvde -f > filename.txt dump the group membership of
    >>> each user along with the other default data?

    >>
    >> Hi,
    >>
    >> Use -l followed by a list of the attributes desired. For example:
    >>
    >> csvde -f output.txt -l memberOf
    >>
    >> However, only the attributes listed are displayed. This does not add to
    >> the default list.
    >>
    >> --
    >> Richard
    >> Microsoft MVP Scripting and ADSI
    >> Hilltop Lab - http://www.rlmueller.net
    >>

    >
    >




Similar Threads

  1. Replies: 6
    Last Post: 01-02-2011, 04:26 PM
  2. Replies: 2
    Last Post: 04-07-2008, 06:10 AM
  3. Exporting member of a particular group using csvde
    By Graham in forum Active Directory
    Replies: 8
    Last Post: 27-03-2008, 06:01 PM
  4. Export Group membership using script\CSVDE
    By PK in forum Windows Server Help
    Replies: 3
    Last Post: 08-10-2007, 07:46 PM
  5. Export All Active Directory Group memberships to a .txt file
    By RandomEcho in forum Windows Server Help
    Replies: 1
    Last Post: 13-07-2007, 05:31 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,483,677.99334 seconds with 17 queries