Solved

wildcards in powershell?

Posted on 2013-06-12
4
335 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 20 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 43

Assisted Solution

by:Taurus
Taurus earned 20 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

We asked our MSP customer base what their favorite tools were and how they help them serve clients. We focused our questions on favorite tools in the following categories: >PSA tools >RMM tools >Alert management tools >Communication tools and Mo…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

696 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