none
Exchange powershell space occupied by emails in a time interval RRS feed

  • Question

  • Hi, it possible use powershell to get the space occupied by receveid emails between 2 dates?

    Thaks

    Thursday, August 1, 2019 2:38 PM

All replies

  • Try using the below command:

    (Get-TransportServer | Get-MessageTrackingLog -Start "START DATE" -End "END DATE" -Recipients "EMAIL ADDRESS OF RECEPIENT" -EventId RECEIVE | Measure-Object -Sum TotalBytes).Sum / 1KB
    

    Thursday, August 1, 2019 3:07 PM
  • Hi,

    If you want to find which emails are received during this period, you can use Get-MessageTrackingLog as DumbleD0re said.

    If you want to extract those emails from those mailbox, you will need to use Search-Mailbox command.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Friday, August 2, 2019 6:44 AM
  • my aim is to move the e-mails arriving to an address in address in a year into an archive. Since these are several GBs before making the transfer for each box, i wanted to know the size to move.

    Thanks

    Friday, August 2, 2019 12:48 PM
  • If so, you should use Search-Mailbox command:

    Search-Mailbox administrator -SearchQuery "received:>=06/20/2019 And received:<=08/06/2019 " -EstimateResultOnly

    You will could see a result about the size of it.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Tuesday, August 6, 2019 9:38 AM
  • Hi,

    I am writing here to confirm with you how thing going now?

    If the above suggestion helps, please be free to mark it as an answer for helping more people.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Thursday, August 8, 2019 8:25 AM
  • If so, you should use Search-Mailbox command:

    Search-Mailbox administrator -SearchQuery "received:>=06/20/2019 And received:<=08/06/2019 " -EstimateResultOnly

    You will could see a result about the size of it.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    After i move all sent mail previus 31/12/2018 this command result:

    RunspaceId       : 9fd39986-3861-4642-b1df-6e9121bd889e
    Identity         :*********/mailbox/mymailbox
    DisplayName      : mymailbox
    TargetMailbox    :
    TargetPSTFile    :
    Success          : True
    TargetFolder     :
    ResultItemsCount : 78478
    ResultItemsSize  : 21.73 GB (23,331,758,699 bytes)

    Why?

    Thursday, August 8, 2019 8:39 AM
  • After i move all sent mail previus 31/12/2018 this command result.

    You just move emails in "sent items", there still exist emails in "Inbox".

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Tuesday, August 13, 2019 8:22 AM
  • Hi,

    Any update about this thread now?

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Friday, August 16, 2019 10:40 AM