none
Exchange 2010 script to O365 RRS feed

  • 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