Solved

get all mail addresses from exchange 2007

Posted on 2010-11-09
5
416 Views
Last Modified: 2012-05-10
how to get all email addresses in the global address list of exchange 2007 ?
0
Comment
Question by:F_A_H_D
  • 3
  • 2
5 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 34091023
get-Mailbox -ResultSize unlimited | ft name,primarysmtpaddress
will give you all the mailboxes


get-distributiongroup -ResultSize unlimited | ft name,primarysmtpaddress
will give you the distribution groups

get-dynamicdistributiongroup -ResultSize unlimited | ft name,primarysmtpaddress
will give you all the dynamic distribution groups

get-mailcontact -ResultSize unlimited | ft name,primarysmtpaddress
will give you all the mail contacts
0
 
LVL 3

Author Comment

by:F_A_H_D
ID: 34091179
and how to export it to csv or xls
0
 
LVL 49

Accepted Solution

by:
Akhater earned 50 total points
ID: 34091215
get-Mailbox -ResultSize unlimited | select-object name,primarysmtpaddress | export-csv c:\Mailboxes.csv

get-distributiongroup -ResultSize unlimited | select-object name,primarysmtpaddress | export-csv c:\Distro.csv

get-dynamicdistributiongroup -ResultSize unlimited | select-object name,primarysmtpaddress | export-csv c:\DynDistro.csv

get-mailcontact -ResultSize unlimited | select-object name,primarysmtpaddress | export-csv c:\Contacts.csv
0
 
LVL 3

Author Closing Comment

by:F_A_H_D
ID: 34091527
perfect
0
 
LVL 3

Author Comment

by:F_A_H_D
ID: 35783515
and if it exchange 2010
how to get the creation date and last login ?
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now