Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 461
  • 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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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