Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

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
Avatar of Toni Uranjek
Toni Uranjek
Flag of Slovenia image

Hi!

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

Toni
Avatar of bsharath

ASKER

Yes i have a exchange server...
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"

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

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

Any help....
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
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
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
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
I have tryed with and without spaces....
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
Thanks get it now.

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

But no emailid?

Regards
Sharath
ASKER CERTIFIED SOLUTION
Avatar of Toni Uranjek
Toni Uranjek
Flag of Slovenia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial