Solved

Exchange 2007 Query

Posted on 2014-10-29
4
95 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
Comment Utility
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
Comment Utility
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
Comment Utility
OK.  Got it.  I had to change 'Recipients' to {$_.Recipients}

Thanks again jparedis!
0
 
LVL 3

Author Closing Comment

by:TropicalBound
Comment Utility
Perfect!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
In this video we show how to create a Contact 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 >> Contact ta…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

744 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

18 Experts available now in Live!

Get 1:1 Help Now