Export these data from ADS

Hi,

I want a way to export the description,User full name,NT login,Email address of all users  to a file.

REgards
Sharath
LVL 11
bsharathAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Toni UranjekConsultant/TrainerCommented:
Hi!

Full name is not an AD property, can you be more specific? Do you have Exchange Server in your organization?

Toni
bsharathAuthor Commented:
Yes i have a exchange server...
Toni UranjekConsultant/TrainerCommented:
Download adfind tool from: http://www.joeware.net/freetools/tools/adfind/index.htm

Syntax would be something like: "adfind -b dc=xyz,dc=com -f "objectcategory=user" description,displayname,samid,mailnickname"

5 Ways Acronis Skyrockets Your Data Protection

Risks to data security are risks to business continuity. Businesses need to know what these risks look like – and where they can turn for help.
Check our newest E-Book and learn how you can differentiate your data protection business with advanced cloud solutions Acronis delivers

bsharathAuthor Commented:
I used this command
C:\>adfind -b dc=development,dc=group,dc=co,dc=uk -f "objectcategory=user"
description,displayname,samid,mailnickname > c:\desc.txt

AdFind V01.36.00cpp Joe Richards (joe@joeware.net) February 2007

I got this.

dn:CN=Sharath Reddy,OU=Named Accounts,OU=User Accounts,OU=IND,OU=Countries,DC=Development,DC=Group,DC=co,DC=uk
Toni UranjekConsultant/TrainerCommented:
Try this:

adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=person)(samaccountname=*)"
description cn samaccountname mailnickname -nodn -nolabel -csv > c:\desc.txt

bsharathAuthor Commented:
I get this


C:\>adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname mailnickname -nodn -nolabel
-csv > c:\desc.txt
ldap_get_next_page_s: [in-ads-srv02.Development.Group.co.uk] Error 0x57 (87
) - Filter Error
Toni UranjekConsultant/TrainerCommented:
I have tested it in environment without Echange so lose Exchange attribute:

adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname -nodn -nolabel
-csv > c:\desc.txt

Any difference?
bsharathAuthor Commented:
I get this.


C:\>adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname -nodn -nolabel-csv > c:\desc
.txt

AdFind V01.36.00cpp Joe Richards (joe@joeware.net) February 2007

ERROR: Bad Command Line Arg(s)
ERROR:  nolabel-csv

bsharathAuthor Commented:
Any help....
Toni UranjekConsultant/TrainerCommented:
Typo, one space is missing:

adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname -nodn -nolabel -csv
bsharathAuthor Commented:
Still get this.


C:\>adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname -nodn -nolabel -csv
"cn","samaccountname"
ldap_get_next_page_s: [in-ads-srv02.Development.Group.co.uk] Error 0x57 (87
) - Filter Error
Toni UranjekConsultant/TrainerCommented:
There are spaces between these switches "-nodn -nolabel -csv", your error is genereted, beacuse you are missing space here: "-nolabel -csv"

adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname -nodn -nolabel
-csv > c:\desc.txt
bsharathAuthor Commented:
I get this

C:\>adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname-nodn-nolabel-csv

AdFind V01.36.00cpp Joe Richards (joe@joeware.net) February 2007

Using server: in-ads-srv02.Development.Group.co.uk:389
Directory: Windows Server 2003

ldap_get_next_page_s: [in-ads-srv02.Development.Group.co.uk] Error 0x57 (87
) - Filter Error


0 Objects returned

C:\>adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname-nodn -nolabel-csv

AdFind V01.36.00cpp Joe Richards (joe@joeware.net) February 2007

ERROR: Bad Command Line Arg(s)
ERROR:  nolabel-csv


Type AdFind /help or AdFind /? for usage assistance.


C:\>adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname -nodn-nolabel-csv

AdFind V01.36.00cpp Joe Richards (joe@joeware.net) February 2007

ERROR: Bad Command Line Arg(s)
ERROR:  nodn-nolabel-csv


Type AdFind /help or AdFind /? for usage assistance.


C:\>adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=pers
on)(samaccountname=*)"description cn samaccountname -nodn -nolabel -csv
cn,"samaccountname"
ldap_get_next_page_s: [in-ads-srv02.Development.Group.co.uk] Error 0x57 (87
) - Filter Error
bsharathAuthor Commented:
I have tryed with and without spaces....
Toni UranjekConsultant/TrainerCommented:
Hi!

I have uploaded txt file which has command that's working to: https://filedb.experts-exchange.com/incoming/ee-stuff/3704-adfind.txt

HTH

Toni
bsharathAuthor Commented:
Thanks get it now.

"1878","Rajesh Rayen","RajeshR","and","and"
"1879","Sharath Reddy","SharathR","and","and"

But no emailid?

Regards
Sharath
Toni UranjekConsultant/TrainerCommented:
There are two AD properties related to email address: mail and mailnickname. Mail is the entry on user's General tab, mailnickname is property related to Exchange's alias for mailbox. Modify the script you've downloaded to include these properties:

adfind -b dc=development,dc=group,dc=co,dc=uk -f "&(objectcategory=person)(samaccountname=*)" description cn samaccountname mail -nodn -nolabel -csv


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.