Solved

Exchange 2007 Query

Posted on 2014-10-29
4
98 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
  • 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

Can’t get the mobile email signature right?

Not having any luck when trying to create an email signature for mobile devices? Does the formatting keep messing up? Make sure you have great email signatures on all devices by using Exclaimer Cloud - Signatures for Office 365.

Question has a verified solution.

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

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

861 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

22 Experts available now in Live!

Get 1:1 Help Now