Distribution list user’s details in active directory

Hi Guys,

I have a DL in Active directory and I need to export all the users in this DL

The outcome is to list Full name, userID,email Address,Company phone,Mobile,IPphone,devision , basically everything if that possible please

I prefer it to be done in PS

Thank you in advance
RabihhajIT HelpDeskAsked:
Who is Participating?
 
Mike KlineCommented:
To start you can use

Get-ADGroupMember GroupName| get-aduser -properties *

Open in new window


That will show you available properties, you can then pick what you want for example

get-adgroupmember GroupName | get-aduser -properties * | select-object name, userprincipalname

Open in new window


I only picked a few properties but you get the idea

You can then export it

get-adgroupmember GroupName | get-aduser -properties * | select-object name, userprincipalname | export-csv -path  PathToFile -notypeinformation

Open in new window


Thanks

MIke
0
 
RabihhajIT HelpDeskAuthor Commented:
Hi Mike
if I want to Export it to H drive   where do I replace the path example "H:\listodDL.csv"
0
 
Mike KlineCommented:
export-csv -path h:\listDL.csv

Thanks

Mike
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
RabihhajIT HelpDeskAuthor Commented:
Great solution
0
 
RabihhajIT HelpDeskAuthor Commented:
Hi Mike ,

sorry I trouble you again ,

is the above script will bring up all the sub DL and contact users also

Please advise  

Thanks
rabih
0
 
RabihhajIT HelpDeskAuthor Commented:
Hi Mike ,

Could you please assist me , I am running your above script to bring all the users in  sub-distribution lists which has multiple DL's nested inside  the main one  , for some reason did not bring up all the sub DL users , could you please assist ..


Thanks
Rabih
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.