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

x
?
Solved

Exchange Powershell help

Posted on 2016-11-11
6
Medium Priority
?
92 Views
Last Modified: 2016-11-13
We have an on prem exchange 2013 server and an O365 account for our Skype for Business.  Our mail flows in and out through O365.

I need a trace report showing ALL mail flowing out and who sent it.  The problem I have is that I have to pick a domain or a mailbox or something and I need ALL mail flowing to O365 from our on prem server.

The trace report isn't helping me so I'm thinking powershell.

Can anyone help with a powershell that will show me all mail flowing out from our on prem to our O365 connector and who the sender was?

Thanks

Cliff
0
Comment
Question by:crp0499
[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
  • 2
  • 2
6 Comments
 
LVL 71

Accepted Solution

by:
Qlemo earned 1000 total points
ID: 41884588
Something like
Get-MessageTrackingLog -EventID Transfer | ft -a Sender, Recipients, MessageSubject, Timestamp

Open in new window

does not work for you?
0
 

Author Comment

by:crp0499
ID: 41885015
And how can I pipe that to a CSV please sir?
0
 
LVL 14

Assisted Solution

by:Schnell Solutions
Schnell Solutions earned 1000 total points
ID: 41885019
Get-MessageTrackingLog -EventID Transfer | Select  Sender, Recipients, MessageSubject,Timestamp | export-csv -path c:\folder1\file1.csv
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

Author Comment

by:crp0499
ID: 41885022
When I add the export to csv, all I get is a column in excel with that looks like a GUID or something.  when i do not pipe to csv, it outputs correctly in the command window
0
 
LVL 14

Expert Comment

by:Schnell Solutions
ID: 41885030
Ohs, that is for the 'Recipient' column right? because it is a multi string value that cannot be catch as the field of an csv file. There are other formats that can catch that column, but they are not for excel, one example is to export it as XML (which is quite different).

The rest of the values that are not multiples are suppose to display ok, and if you want to check all the possible fields that you have, you can execute:

Get-MessageTrackingLog -EventID Transfer | Select  * | export-csv -path c:\folder1\file1.csv
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 41885242
You've closed the question prematurely.
For a CSV-suitable output use
Get-MessageTrackingLog -EventID Transfer |
  Select  Sender, @{n='Recipients'; e={$_.Recipients -join ';'}}, MessageSubject,Timestamp |
  export-csv -NoType c:\folder1\file1.csv

Open in new window

This creates a semicolon-separated recipients list as a single column, and also suppresses the first line with type info in the CSV which is of no use for you (It is for re-importing into PowerShell, using correct types instead of plain strings).

Another common way to handle such lists is by creating "duplicate" entries for each single recipient, but I guess that is unwanted here.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
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