Solved

Exchange 2007 Query

Posted on 2014-10-29
4
104 Views
Last Modified: 2014-10-30
Hello,

I need to query a specific mailbox in Exchange 2007.  I need to go back one month and retrieve the header information for all emails from and to this user, and export it to a CSV.  Something like:

Date | From | To | Subject

I imagine this is possible using PowerShell, but that is not my forte.  Any help would be greatly appreciated.

Thank you!
0
Comment
Question by:TropicalBound
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 2

Accepted Solution

by:
jparedis earned 500 total points
ID: 40411932
I assume it would have to be something like this:

1. List mails from specific user
Get-TransportServer  | Get-MessageTrackinglog -Start "mm/dd/yyy 00:00:00" -Sender "user@domain.com" | Select TimeStamp,Sender,Recipients,MessageSubject |Export-Csv "C:\Path\To\file.csv"

2. List mails sent to specific user
Get-TransportServer  | Get-MessageTrackinglog -Start "mm/dd/yyy 00:00:00" -Recipients "user@domain.com" | Select TimeStamp,Sender,Recipients,MessageSubject |Export-Csv "C:\Path\To\file.csv"

What these commands do is listing all existing HubTransport Servers in your Exchange Organization, and query them for the information you specify.
0
 
LVL 3

Author Comment

by:TropicalBound
ID: 40413326
jparedis,

Thank you very much!  This is almost perfect, except that all the recipients come back as "System.String[]".  Have I entered something incorrectly?
0
 
LVL 3

Author Comment

by:TropicalBound
ID: 40413529
OK.  Got it.  I had to change 'Recipients' to {$_.Recipients}

Thanks again jparedis!
0
 
LVL 3

Author Closing Comment

by:TropicalBound
ID: 40413533
Perfect!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
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…
In this video we show how to create an Address List 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 Organization >> Ad…

737 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