Exchange Server & MS Outlook Blog

Export Exchange mailbox for a particular date range

Summary – This blog explains two approaches to export Exchange mailbox for a particular date range. The Exchange administrators can compare both approaches based on the advantages and disadvantages and use the one to suit their requirements. This blog applies for Exchange 2019, 2016, 2013, 2010.

As an Exchange administrator, you may need to export mailbox to PST for many reasons. But sometimes, you may require specific data and need to export information from a mailbox to PST for a certain date range instead of the entire mailbox. This can be done by using the Exchange Management Shell (EMS) cmdlets or third-party EDB to PST converter software. Unlike EMS, the software features a GUI interface which makes it’s much more easier to export selected mailbox and mail items for specific date range in a few clicks.  

Nevertheless, if you want to export Exchange mailbox for a particular date range to PST, we have explained both methods below in detail.

So, if you demand to export Exchange mailbox for a particular date range, follow the methods described below:

Methods to Export Mailbox for a Given Date Range – Exchange Server 2010, 2013, 2016, and 2019

Method 1: Use New-MailboxExportRequest Cmdlet in PowerShell 

In Exchange Server 2010, 2013, 2016, and 2019, you can use the New-MailboxExportRequest to export mailbox to PST. The command is used to export a complete mailbox or multiple mailboxes to PST in Exchange server.

The same command can be used to export mail items from a mailbox or multiple mailboxes for a certain date range by adding the –ContentFilter switch in the cmdlet. The command is as follows,

New-MailboxExportRequest -ContentFilter {(Received -lt ’02/01/2020′) -and (Received -gt ’12/31/2019′)} -Mailbox “John” -Name John –FilePath\\ExchServer\Exports\John.pst

The above command exports ‘Received’ mail items (Inbox) from John’s mailbox for a date range December 31, 2019 to February 01, 2020. The PST is saved at a network location folder ‘Exports’ with file name John.pst.

You can further create a .csv or .txt file and use a Foreach statement to export multiple mailboxes data for a certain date range in a single PST file. The steps are as follows,

Step 1: Open Notepad and enter the user account names in the Notepad, like this

Step 2: Save the Notepad file as mailboxnames.txt file to C: drive volume. You can also save it on any other drive volume or folder location.

Step 3: Open a new Notepad file and paste the following code in the file

$mailboxes = (get-content C:\mailboxnames.txt)
foreach ($mailbox in $mailboxes) {
New-MailboxExportRequest -Mailbox $mailbox -ContentFilter {(Received -lt'02/15/2020') -and (Received-gt '01/12/2020')} -FilePath "\\ExchServer\Exports\Mailboxes.pst" 
}

Step 4: Save the Notepad file as Export.ps1

Step 5: In PowerShell, navigate to the location where Export.ps1 script is saved by using the cd command

Step 6: Enter .\Export.ps1 to execute the PowerShell script

Similarly, you can also export Sent mail items from the mailbox to PST for a particular date range. All you have to do is replace ‘Received’ text in the command with ‘Sent’ to export all mailbox messages sent between December 31, 2019 and February 01, 2020.

New-MailboxExportRequest -ContentFilter {(Sent -lt ’02/01/2020′) -and (Sent -gt ’12/31/2019′)} -Mailbox “John” -FilePath\\ExchServer\Exports\John.pst

How to Know If This Worked?

The problem with this method is that you can’t see any progress. You don’t know if the command you ran executed successfully or not. Also, if all mailboxes export request was executed or not.

However, you can check it manually by executing the following command,


Get-MailboxExportRequestStatistics -Identity "<MailboxIdentity>\<MailboxExportRequestName>"

This command displays the status of your export and helps you know if the command worked.

Limitations of New-MailboxExportRequest Cmdlet

There are a few limitations of this method.

Method 2: Use an EDB to PST Converter Software (Automated Method)

If you don’t have the necessary permissions to export mailbox, lack required technical skills, or simply want to avoid all the hassles, use an EDB to PST converter software such as Stellar Converter for EDB.

The software provides you with the options to export mailbox sent or received during a particular date range with a few clicks. Stellar Converter for EDB provides a ‘Search Criteria’ window that allows you (Exchange administrators) to search and export emails within the particular date range from single or multiple mailboxes to PST.

By using this software, you can export mailboxes from both hosted and offline EDB directly to a Live Exchange Server or Office 365 account.

To use Stellar Converter for EDB to export Exchange mailbox for a particular date range, download and install the software on your system. Then follow these steps:

1.Choose the conversion mode by clicking on ‘Offline EDB’ or ‘Hosted Exchange

2. Browse and select the EDB file by clicking on ‘Browse’ or use the ‘Find’ option to locate all EDBs, depending on whether the location of the EDB file is known to you or not. Then click on the ‘Next’

3.With a click on the ‘Next’ button, the software begins scanning the EDB file and lists all the mailboxes and mail items. Click on Find Message button at the top, or select Search from the Preview Tab

4.Enter the data range and other search criteria to find the mail items from one or multiple mailboxes for PST export.

Note: The ‘Search Criteria’ window of this EDB to PST file conversion software not only provides ‘selection of date range’ feature but several others to select emails. Emails can be searched based on ‘To’, ‘From’, ‘Cc’, ‘Subject’, ‘Body’, ‘Attachment Name’, ‘Importance’, and ‘Item Type’.

5. Once done, click on the ‘Save’ icon that is present in the ‘Home’ menu. The ‘Save’ dialog box comes up, from where you can select one from multiple file saving options, such as PST, Live Exchange, Office 365, MSG, EML, RTF, HTML, and PDF.

Advantages of Using EDB to PST Converter Software

Other Features of this Software

This software provides many other features that are as follows:

Conclusion

As such, there is no disadvantage associated with the ‘New-MailboxExportRequest’ cmdlet to export Exchange mailbox for a particular date range, except a few limitations as discussed in this post. Exchange administrators need to be careful while using the New-MailboxExportRequest cmdlet and make sure that the syntax is correct.

However, there’s a much better solution to this problem, which is faster and easier, without any limitations as such. Stellar Converter for EDB software offers multiple features in addition to exporting Exchange mailbox for a specific date range. And these features are exceedingly beneficial when it comes to exporting mailboxes from the Exchange server to PST or another Exchange server. The software supports Exchange 2019, 2016, 2013, 2010, 2007, 2003, 2000 and 5.5.

Unlike PowerShell, the software has an easy-to-use GUI which makes EDB file conversion job easy and quick. And most importantly, you can see the export progress and export single or multiple mailboxes in a few clicks. It is a tool that can come to multiple uses of Exchange administrators.

Exit mobile version