We help IT Professionals succeed at work.

Hoist the colors! We’ve added location flags to usernames sitewide, so it's easier to connect with the global community on EE. View My Profile

x

Export these data from ADS

718 Views
Last Modified: 2008-04-24
Hi,

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

REgards
Sharath
Comment
Watch Question

Toni UranjekConsultant/Trainer

Commented:
Hi!

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

Toni

Author

Commented:
Yes i have a exchange server...
Toni UranjekConsultant/Trainer

Commented:
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"

Author

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/Trainer

Commented:
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

Author

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/Trainer

Commented:
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?

Author

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

Author

Commented:
Any help....
Toni UranjekConsultant/Trainer

Commented:
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

Author

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/Trainer

Commented:
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

Author

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

Author

Commented:
I have tryed with and without spaces....
Toni UranjekConsultant/Trainer

Commented:
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

Author

Commented:
Thanks get it now.

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

But no emailid?

Regards
Sharath
Consultant/Trainer
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.