Asked by:
Exchange 2010 script to O365

Question
-
Hi Scripting guys,
I wrote a script a while ago to send my clients a daily message report. the output basically gives the client a daily email with the top 20 senders and mail stats. total sent, size, number of recipients etc.
Getting the information was easy because I could use commands like get-transportserver and get-messagetrackinglog.
So in O365 you no longer use get-transportserver, and get-messagetrackinlog changed to get-messagetrace
What I can't find and hope that you can help me is, my script also pulled the eventID to sort send and receive data.Here is a snippet.
#more script above $hubs = Get-TransportServer # Get the start date for the tracking log search $Start = (Get-Date -Hour 00 -Minute 00 -Second 00).AddDays(-1) # Get the end date for the tracking log search $End = (Get-Date -Hour 23 -Minute 59 -Second 59).AddDays(-1) $Datum = $Start.ToShortDateString() $Sum = 0 $receive = $hubs |get-messagetrackinglog -Start $Start -End $End -EventID "RECEIVE" -ResultSize Unlimited | select Sender,RecipientCount,TotalBytes,Recipients $send = $hubs |get-messagetrackinglog -Start $Start -End $End -EventID "SEND" -ResultSize Unlimited | select Sender,RecipientCount,TotalBytes $mreceive = $receive | Measure-Object TotalBytes -maximum -minimum -average -sum $msend = $send | Measure-Object TotalBytes -maximum -minimum -average -sum $TotalRecipient = $send | Measure-object RecipientCount -sum $groupedby = $send | group sender |Sort-Object count #More script Below
Is there a way to get the individual event ID from O365.
Thanks in advance,
- Edited by Nightfearz Wednesday, February 21, 2018 1:57 PM damn grammar
- Moved by Bill_Stewart Monday, April 30, 2018 9:21 PM This is not "scripts on demand"
Wednesday, February 21, 2018 1:54 PM
All replies
-
This report can be run from your O365 Admin portal.
For basic user issues with O265 post in the O365 community forums available on your Admin portal "help" button.
\_(ツ)_/
Wednesday, February 21, 2018 3:21 PM -
Thank you for your reply, but that, unfortunately, won't work. The o365 portal has a few flaws which will not work in my case.
1.) The reason for PowerShell is to script and automate, which cannot be done in the portal
2.) the portal gives a 7day/30 day report not a daily report
3.) the question was related to Powershell and possible alternatives to my current on-premise script <g class="gr_ gr_258 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" data-gr-id="258" id="258">not</g> O365 support
Thursday, February 22, 2018 6:38 AM -
You are not asking a question. You are asking for a solution to a vague list of requirements.
I recommend that you post your issues in the O365 community forums accessible from the O365 portal Admin site.
Please carefully review the following links to set your expectation of technical forums.
This Forum is for Scripting Question Rather than script requests
From a Bill Stewart summary of useful forum links:
- Posting guidelines
- Handy tips for posting to this forum
- How to ask questions in a technical forum
- Rubber duck problem solving
- How to write a bad forum post
- Help Vampires: A Spotter's Guide
- This forum is for scripting questions rather than script requests
\_(ツ)_/
Thursday, February 22, 2018 6:44 AM -
Here are the Exchange online reporting CmdLets. They will get you the information you seek.
https://technet.microsoft.com/en-us/library/dn641232(v=exchg.160).aspx
\_(ツ)_/
Thursday, February 22, 2018 6:47 AM -
Here is the replacement for the old Exchange tracking log:
https://technet.microsoft.com/en-us/library/jj200725(v=exchg.150).aspx
Post in the Exchange online forum for assistance with using Exchange online with PowerShell.
\_(ツ)_/
Thursday, February 22, 2018 6:52 AM