Link to home
Start Free TrialLog in
Avatar of nav2567
nav2567Flag for United States of America

asked on

export AD attribute

what tool I can use to display the distingushed name and IP phone field of an user?  Or export these info to a file?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Shift-3
Shift-3
Flag of United States of America 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
You could add a redirection operator to output to a text file.


dsquery user -samid user.name | dsget user -dn -iptel -L > output.txt

Open in new window

Avatar of Manpreet SIngh Khatra
You can also get the complete data into a CSV file ...... meaning all attribute information and then filter

csvde -f C:\user.csv
SOLUTION
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
SOLUTION
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
Avatar of nav2567

ASKER

I appreciate for everyone's feedback.   I am still exploring which option is best to use.
I am not sure if it is my all_employees_group has too many members, I am not able to use the following to display the info I need.  If I specify another group with less members, it works.  Please advise.  
dsquery group -name all_employees_group |dsget group -members |dsget user -dn -iptel
 
By default, dsquery only retrieves the first 100 results.  Include -limit 0 before the first pipe to bypass this.
Avatar of nav2567

ASKER

Thanks.   I also realize using a -c switch will bypass the errors.
Last question to everyone, if I need to update the ip phone field for all users, can I use the similar trick?  
Yes, you can use dsmod with the -iptel switch.
Avatar of nav2567

ASKER

The suggestion by Shift-3 seems to work better for our issue.  But also appreciate the other two members jump in and help.

Thanks everyone again.