Re: export to a AD Distributed group to a text



City attribute is a lower case 'L'. Hey, not trying to be snide, but if you
can not find all of the attributes a great way to learn them it so play with
ldifde. Create - in the lab - a user account object with certain attributes
populated and then look at the .ldf file that ldifde will create. Then
populate a few more attributes. Run ldifde again. It is a very slow
process, but you will really learn.

--
Cary W. Shultz
Roanoke, VA 24012

"Ammar" <Ammar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FB2CB645-E19E-4DDD-9535-5EEF005B127B@xxxxxxxxxxxxxxxx
WoOw physicalDeliveryOfficeName is equeal to office attribute ,what about
City attribute ?

and where can i found a list of all those attributes




"Richard Mueller" wrote:

Ammar wrote:

I have a client who want me to export a distributed gruop members in my
Active directory to a text file ,
Thet want the members of this group to be listed with their office
attribute .
can this be done and how

Hi,

Using csvde you can use a command similar to the following (watch line
wrapping, this is all one line):

csvde -f report.txt -r (memberOf="cn=My
Group,ou=Sales,dc=MyDomain,dc=com") -l
sAMAccountName,physicalDeliveryOfficeName

You must specify the full Distinguished Name of the group for the
memberOf
attribute. The sAMAccountName attribute is the NT name of the member
(also
called the "pre-Windows 2000 logon name"). The LDAP display name of the
"Office" attribute is physicalDeliveryOfficeName.

In VBScript, you can bind to the group and use the Members method of the
group object to enumerate all members. For each member, you would output
the
values of the attributes desired. For example:
=====================
Option Explicit
Dim objGroup, objMember

Set objGroup = GetObject("LDAP://cn=My
Group,ou=Sales,dc=MyDomain,dc=com")
For Each objMember In objGroup.Members
Wscript.Echo objMember.sAMAccountName & ", " &
objMember.physicalDeliveryOfficeName
Next
=====================
If you run this at a command prompt with the cscript host, the output can
be
re-directed to a text file. For example, if the above VBScript program is
in
a file called ListGroup.vbs, use the following command to create a report
called output.txt:

cscript //nologo ListGroup.vbs > output.txt

The "//nologo" option suppresses logo information. The above assumes you
are
currently in the directory where the file ListGroup.vbs is located -
otherwise you must specify the full path to the file.

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





.



Relevant Pages

  • Star : Who will the mayor opt for? Topic List < Prev Topic | Next Topic >
    ... KUALA Lumpur City Hall Advisory Board members get RM600 each time they ... criticism towards the Draft Kuala Lumpur City Plan 2020 recently. ...
    (soc.culture.malaysia)
  • Update From New Orleans
    ... both for our members and allies whose lives were lost, and for all of us whose ... And we are rageful at a city and state who intend to rebuild the ... We have gathered clothes and furniture donations for our ... We could go on and on but know that folks have much to read and do. ...
    (soc.rights.human)
  • Re: export to a AD Distributed group to a text
    ... The first spreadsheet documents most attributes corresponding to the fields ... City is "l". ... you can bind to the group and use the Members method of the ... If you run this at a command prompt with the cscript host, ...
    (microsoft.public.windows.server.active_directory)
  • Anti-Gun Democrats DEFEATED, Again - NRA lawsuit against Evanston remains pending
    ... Evanston members of the National Rifle Association are still waiting ... on a final decision in their lawsuit against the City of Evanston ... Three local NRA members filed the complaint in June after the Supreme ...
    (alt.politics)
  • No more stink
    ... LA politicians have delivered to our city the ... They have made LA a safe haven for gang members and foreign criminals. ... Bad schools - Republicans ...
    (rec.autos.simulators)