[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

wildcards in powershell?

Posted on 2013-06-12
4
Medium Priority
?
342 Views
Last Modified: 2013-06-17
i am trying to pull some records from the journal from @domain.com and to @domain.com  i know the syntax to pull from the journal and to place in a target mailbox, but for the life of me i can't figure out how to pull these messages.  i need to pull all this communication for our attorney ASAP and am desperate. Please help!

thanks.
0
Comment
Question by:Roy Ortiz
[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
  • 2
4 Comments
 
LVL 13

Assisted Solution

by:Ugo Mena
Ugo Mena earned 60 total points
ID: 39241822
I am going to assume you mean the message tracking log not journal.

The following commandlet lists all emails to a domain from outside your organization during a given time fame. It then sorts into a columns and exports to a .txt or .csv.

get-messagetrackinglog -server "mailserver" -Start "01/01/2012 09:00:00" -End "01/01/2013 17:00:00" -resultsize unlimited | where {$_.Recipients -like "*@domainname"} | Select timestamp,recipients,messagesubject,source >>c:\exported.txt

Replace mailserver with your exchange server’s name. -server "mailserver"

Change the timeframe -Start "01/01/2012 09:00:00" -End "01/01/2013 17:00:00"

Change the domain name is it searching from where {$_.Recipients -like "*@domainname"}
To search for emails sending from a particular domain change where {$_.Recipients -like "*@domainname"} to where {$_.Sender -like "*@domainname"}

Change the c:\exported.txt to whatever you want your output file to be named and saved.


http://technet.microsoft.com/en-us/library/bb124926%28v=exchg.141%29.aspx

Above link describes how to use the Exchange Management Console or the Exchange Management Shell to search the message tracking logs
0
 
LVL 44

Assisted Solution

by:Amit
Amit earned 60 total points
ID: 39242118
Are you referring to Journal mailbox?
0
 

Accepted Solution

by:
Roy Ortiz earned 0 total points
ID: 39242413
yes i was referring to the journal.  i was able to figure it out by simply leaving out any kind of wildcard and just using To:@domain.com, then running it again using From:@domain.com.  This has give us just what we needed. thanks for the advice though.
0
 

Author Closing Comment

by:Roy Ortiz
ID: 39252597
after some test runs in powershell i was able to discover how to run the queries i needed.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

In this article, WatchGuard's Director of Security Strategy and Research Teri Radichel, takes a look at insider threats, the risk they can pose to your organization, and the best ways to defend against them.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
To show how to generate a certificate request 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 Servers >> Certificates…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

649 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