Gurus,
How can I make a csvde -f > filename.txt dump the group membership of each
user along with the other default data?
--
Spin
Gurus,
How can I make a csvde -f > filename.txt dump the group membership of each
user along with the other default data?
--
Spin
"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
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
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
>
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
>>
>
>
Bookmarks