Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Need CSVDE to dump user group memberships

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 14-01-2006
Spin
 
Posts: n/a
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



Reply With Quote
  #2  
Old 14-01-2006
Al Dunbar
 
Posts: n/a
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


Reply With Quote
  #3  
Old 14-01-2006
Richard Mueller
 
Posts: n/a
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


Reply With Quote
  #4  
Old 18-01-2006
Spin
 
Posts: n/a
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
>



Reply With Quote
  #5  
Old 18-01-2006
Richard Mueller
 
Posts: n/a
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
>>

>
>



Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Need CSVDE to dump user group memberships"
Thread Thread Starter Forum Replies Last Post
VB Script returns all group memberships for a user EXCEPT Exchange Dist groups SecurityGuy Active Directory 6 01-02-2011 04:26 PM
Adding group/user to local Admins group on all workstations? IJAYA Window 2000 Help 2 04-07-2008 06:10 AM
Exporting member of a particular group using csvde Graham Active Directory 8 27-03-2008 06:01 PM
Export Group membership using script\CSVDE PK Windows Server Help 3 08-10-2007 07:46 PM
Export All Active Directory Group memberships to a .txt file RandomEcho Windows Server Help 1 13-07-2007 05:31 AM


All times are GMT +5.5. The time now is 07:18 PM.