How to Use Set-MailboxExportRequest Cmdlet?

Summary: To recover from a failed mailbox export request, you can use the Set-MailboxExportRequest to change the export request options. In this guide, you will learn how to use the Set-MailboxExportRequest cmdlet, along with various parameters. You will also learn about an EDB to PST converter software that can export mailboxes and other data from EDB file to PST without any data loss.

In MS Exchange Server (2010 SP1 and later), you can export mailboxes from the Exchange database (EDB) file to PST by using the New-MailboxExportRequest cmdlet. However, sometimes, a few mailbox export requests fail or do not complete. This happens if there are any corrupted or large items in the source mailbox or various other reasons. In such a case, you can use the Set-MailboxExportRequest cmdlet. This cmdlet allows you to change the options in the mailbox export request after it has been executed and helps to recover from the failed mailbox export requests. In this blog, we will see how to use the Set-MailboxExportRequest PowerShell cmdlet, along with different parameters.

Using the Set-MailboxExportRequest Cmdlet in Exchange Server

Like other cmdlets, you must have the required roles and permissions assigned before using the Set-MailboxExportRequest cmdlet. You must be assigned with the Mailbox Import Export role to use this cmdlet.

Following is the Set-MailboxExportRequest syntax you can use to modify the Exchange Mailbox Export request.

Set-MailboxExportRequest –Identity <mailbox export request identity> <Common Parameter>

You can use the cmdlet with various parameters to add exceptions to the failed requests. Some common parameters are.

1. –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 item is a corrupted item in the source mailbox that can’t be copied to the target mailbox. If you set the -BadItemLimit value to 51 or higher, you also need to use the AcceptLargeDataLoss switch with the cmdlet. Here’s how to use the cmdlet:

Set-MailboxExportRequest -Identity "Eric\MailboxExport1\" -BadItemLimit 51 –AcceptLargeDataLoss

The above command will modify the export request with identity – Eric\MailboxExport1 to skip up to 51 corrupted items while exporting the mailbox.

2. –LargeItemLimit

This parameter is used to specify the number of large items to be allowed before the export request fails. This is useful if the export request fails or does not complete due to large messages that exceed the maximum message size, allowed in the target mailbox.

Note: When you use this parameter, the specified number of large items will be excluded from the exported PST file. Use it only if you are okay with skipping the large items.

Here’s how to use the Set-MailboxExportRequest cmdlet with the LargeItemLimit parameter.

Set-MailboxExportRequest -Identity "Eric\MailboxExport1\" -LargeItemLimit 51 -AcceptLargeDataLoss

This command will modify the export request with identity – Eric\MailboxExport1 to skip up to 51 large items while exporting the mailbox.

3. –AcceptLargeDataLoss

The –AcceptLargeDataLoss parameter is used with the –BadItemLimit and –LargeItemLimit parameters. This parameter specifies that the request should continue even if a large number of items or bad items in the source mailbox cannot be copied to the target mailbox. You need to use this parameter if you’re setting the value for BadItemLimit or LargeItemLimit to 51 or above. Otherwise, the command will fail and display an error similar to the below:

Here’s how to use the Set-MailboxExportRequest cmdlet with the AcceptLargeDataLoss parameter:

Set-MailboxExportRequest -Identity "Eric\MailboxExport1\" -BadItemLimit 100 -LargeItemLimit 100 –AcceptLargeDataLoss

After executing the above cmdlet, you will get a warning message that the large or corrupted items (based on the defined value) will not be available in the destination mailbox.

4. –CompletedRequestAgeLimit

This parameter 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. Here’s an example:

Set-MailboxExportRequest -Identity "Eric\MailboxExport1\" –CompletedRequestAgeLimit 20

This command will remove the mailbox export request of the identity – Eric\MailboxExport1\ after 20 days.

5. –Priority

This parameter is used to specify the order in which the export requests will be processed. You can prioritize a mailbox export request based on various values, such as Lowest, Lower, Low, High, Higher, Highest, and Emergency. By default, the export requests are executed in a queue (Normal priority). Here’s an example of the cmdlet:

Set-MailboxExportRequest -Identity "John\MailboxE xport01\" –Priority High

6. –WhatIf

The WhatIf parameter is used to simulate the command actions. By using this switch, you can check what changes would occur before you actually run the command on the mailbox. There is no need to specify a value with this parameter. Here’s an example of the cmdlet with the WhatIf parameter.

Set-MailboxExportRequest -Identity "John\MailboxExport01\" –Priority High –WhatIf

An Easy Way to Export Mailboxes to PST

To simplify the process of exporting user mailboxes to PST, you can use Stellar Converter for EDB – an EDB to PST converter software that can open EDB file (online/offline) from any version of Exchange Server – from Exchange 2007 to Exchange 2019. You can then select the mailboxes that you want to export to PST. Unlike the New-MailboxExportRequest cmdlet, the software shows the status of the export process on the screen. You can also export the mailboxes directly to a live Exchange Server or Office 365.

Conclusion

Above, we have discussed how to use the Set-MailboxExportRequest PowerShell cmdlet to recover from the failed mailbox export requests. However, using the BadItemLimit and LargeItemLimit parameters with the cmdlet can result in data loss. To prevent data loss and export the mailboxes to PST without any hassle, you can use Stellar Converter for EDB. This software can convert the mailboxes and other items in the EDB file to PST and various other formats in just a few clicks. It also shows preview of the mailbox items after the EDB scan and lets you filter, choose, and export the selected mail items from the listed mailboxes.

Related Post

Stellar Data Recovery

Trial Download is for Desktop or Laptop. Put your email id to receive the download link




Exit mobile version