Solved

Exchange 2007 Query

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

This article explains how to install and use the NTBackup utility that comes with Windows Server.
In-place Upgrading Dirsync to Azure AD Connect
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

735 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