Summary: In this blog, you will learn how to use the Set-MailboxExportRequest cmdlet in Exchange Management Shell (EMS) to change the export request options and recover from failed PST export requests. The cmdlet is used after the mailbox export request has been created via EMS or EAC (Exchange Admin Center).
In MS Exchange 2010 SP1 and later versions, you can export mailboxes from the Exchange database (EDB) file to PST by using New-MailboxExportRequest cmdlet. However, sometimes, a few mailbox export requests may fail or does not complete. In such cases, you can use the Set-MailboxExportRequest cmdlet to modify the mailbox export requests.
NOTE: To run Set-MailboxExportRequest cmdlet, user should be assigned Mailbox Import Export role. Also, the command is available in on-premises Exchange only.
Reasons for Mailbox Export Request Failure
There could be many reasons that may lead to failure of mailbox export request created via EMS or EAC in MS Exchange. Some common reasons are as follows,
- Insufficient permissions to execute Mailbox Import Export cmdlets
- Large mailbox size
- Bad items in the mailbox that you are trying to export
- Corrupt or damaged database
You can learn more about when and why New-MailboxExportRequest fails and how to export Mailboxes to PST in such cases.
Syntax for Set-MailboxExportRequest Cmdlet
Following is the Set-MailboxExportRequest syntax you can use to modify the Exchange Mailbox Export request.
Set-MailboxExportRequest [-AcceptLargeDataLoss <SwitchParameter>] [-BadItemLimit <Unlimited>] [-BatchName <String>] [-CompletedRequestAgeLimit <Unlimited>] [-LargeItemLimit <Unlimited>] [-Priority <Lowest | Lower | Low | Normal | High | Higher | Highest | Emergency>] [-SkipMerging <SkippableMergeComponent[]>] <COMMON PARAMETERS>
The Set-MailboxExportRequest can be used to add exceptions to the failed requests by adding parameters, such as,
1. –AcceptLargeDataLoss
This parameter specifies that the export request should be executed even if large amount of data loss occurs, i.e. a large number of mailbox items are skipped and not copied from the source mailbox to the exported PST file.
You must use this parameter if you set the –LargeItemLimit or -BadItemLimit parameter value to 51 or higher in Exchange 2013 and Exchange 2010, respectively.
Syntax:
Set-MailboxExportRequest -Identity "John\MailboxExport01\" –AcceptLargeDataLoss
2. –BadItemLimit
This parameter is used to specify the maximum number of bad items that can be skipped during export before the request fails. A bad or corrupt item from the mailbox can’t be copied to the exported PST file.
Syntax:
Set-MailboxExportRequest -Identity "John\MailboxExport01\" -BadItemLimit 15
This cmdlet changes the export request to accept up to 15 corrupt mailbox items during export.
3. –BatchName
It is used to specify the name of the batch and modify a batch export request.
Syntax:
Set-MailboxExportRequest –BatchName <BatchName>
4. –CompletedRequestAgeLimit
It is used to specify an age limit for a failed or completed request. You can use it to remove any export request after a specific time interval post execution.
Syntax:
Set-MailboxExportRequest -Identity "John\MailboxExport01\" –CompletedRequestAgeLimit 20
5. –Confirm
This is used to show or hide the confirmation prompt when you execute a command. It helps acknowledge a destructive command.
Syntax:
Set-MailboxExportRequest -Identity "John\MailboxExport01\" -BadItemLimit 15 –Confirm:$False
This command will execute straightaway without displaying any prompt or warning. You can change -Confirm:$False to -Confirm:$True
6. –LargeItemLimit
It is used to specify and allow maximum number of large items, before the request fails. This is useful if the export request fails or does not complete due to large messages that exceed the maximum message size.
Syntax:
Set-MailboxExportRequest -Identity "John\MailboxExport01\" -LargeItemLimit 15
7. –Priority
This parameter is used to set the export request order based on priority. By defaults, requests created are run in a queue. By using –Priority, you can prioritize a mailbox export request to Lowest, Lower, Low, High, Higher, Highest, and Emergency.
Syntax:
Set-MailboxExportRequest -Identity "John\MailboxExport01\" –Priority High
8. –WhatIf
WhatIf is a switch parameter that is used to simulate the command actions. By using this parameter, you can check what changes would occur before you actually run the command on the object. There’s no need to specify value with this parameter.
Syntax:
Set-MailboxExportRequest -Identity "John\MailboxExport01\" –Priority High –WhatIf
How to Confirm if the Set-MailboxExportRequest Cmdlet Worked?
To check if the Set-MailboxExportRequest cmdlet successfully modified the mailbox export request, run this command in EMS,
Get-MailboxExportRequestStatistics -Identity "<MailboxIdentity>\<MailboxExportRequestName>" | Format-List
However, if the export request is not modified or the export request fails to save mailbox data to PST file, you can use EDB to PST Converter software, such as Stellar Converter for EDB.
The software helps you export all mailbox items, such as emails, contacts, attachments, notes, etc. from an Exchange EDB file to PST. It also allows Exchange admins to export and save the mailbox data to EML, MSG, RTF, PDF and HTML formats in a few clicks.
By using this software, you can avoid using the Set-MailboxExportRequest with parameters such as –AcceptLargeDataLoss or –BadItemLimit that can lead to data loss and incomplete mailbox export.
Besides, the software can convert hosted or offline EDB file & extract mailboxes to Live Exchange or Office 365. It supports Exchange 2019, 2016, 2013, 2010, 2007, 2003, 2000, and 5.5. versions, which makes it a must have tool for all Exchange admins.
Why use Stellar Converter for EDB?
Here is a comparison (see below table) between the Mailbox export via EMS by using
New-MailboxExportRequest and Set-MailboxExportRequest cmdlets, vs. Stellar Converter for EDB.
Conclusion
You can create mailbox export requests from both Exchange Management Shell and Exchange Admin Center in MS Exchange 2010 SP1 or later versions. However, it’s not necessary that the executed export requests will be successfully completed. There could be several reasons that can halt the export request. In such cases, Set-MailboxExportRequest is used to modify the export request to process and export the desired mailbox items to PST files.
But it can lead to loss of mailbox items and incomplete mailbox export. To avoid this, you can use Stellar Converter for EDB that extracts mailboxes from Exchange EDB files and save the mailbox items to a PST file with 100% precision and without losing any mailbox item. You can start by downloading the free demo version.