none
Export all mailbox to pst using command RRS feed

  • Question

  • Can you provide me an script or command by which i can export mailbox ( both inbox and sent item) for a particular date range.
    Tuesday, June 23, 2020 3:15 AM

All replies

  • Hello,

    Following script can be modified for your purpose

    Note that, you need to get the alias list of all mailboxes first as csv file (in this example, mailboxes.csv) first and give as the input of the cmdlet

    $Users = Get-Content "C:\Users\admin\Desktop\mailboxes.csv"foreach ($User in ($Users)) {New-MailboxExportRequest -Mailbox $User -ContentFilter {(Received -gt '02/01/2020') -and (Received -lt '07/01/2020') -or (Sent -gt '02/01/2020') -and (Sent -lt '07/01/2020')} -Filepath "\\Server\PST\Folder1\$($user).pst" }


    Regards From: Exchange Online | World of Cloud Computing

    Tuesday, June 23, 2020 4:07 AM
    Moderator
  • Hi,

    I'm here to confirm with you if your issue has been resolved. If the problem is successfully solved, you can share your solution and mark them or the helpful reply as answer, this will make answer searching in the forum easier and be beneficial to other community members as well.

    Regards,

    Eric Yin


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

    Thursday, July 2, 2020 6:29 AM