• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 464
  • Last Modified:

get all mail addresses from exchange 2007

how to get all email addresses in the global address list of exchange 2007 ?
0
F_A_H_D
Asked:
F_A_H_D
  • 3
  • 2
1 Solution
 
AkhaterCommented:
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
 
F_A_H_DAuthor Commented:
and how to export it to csv or xls
0
 
AkhaterCommented:
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
 
F_A_H_DAuthor Commented:
perfect
0
 
F_A_H_DAuthor Commented:
and if it exchange 2010
how to get the creation date and last login ?
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.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now