How to Use Set-MailboxExportRequest in Powershell: 4 Practical Examples

How to Use Set-MailboxExportRequest in Powershell: 4 Practical Examples

When Exchange administrators need to export mailbox data to a PST file, they often use the New-MailboxExportRequest cmdlet to start the export process. But once an export request is created, it might need to be modified - for example, to adjust limits for corrupted items, change priority, or resume a suspended export. That’s where the Set-MailboxExportRequest cmdlet comes in.

Available only in on-premises Exchange Server (not Exchange Online or Microsoft 365), this cmdlet allows administrators to change properties of an existing export request created by New-MailboxExportRequest. It’s an important tool for controlling mailbox export operations without restarting the entire export job.

What is the Set-MailboxExportRequest Cmdlet?

The Set-MailboxExportRequest cmdlet is used to change the configuration of an ongoing or existing mailbox export request in Microsoft Exchange Server. Administrators can modify options such as how many bad or large items are allowed, the priority of the export, or whether the request should pause when it’s almost complete.

This cmdlet is part of the Exchange Management Shell and works with the Mailbox Replication Service (MRS), which handles mailbox moves, imports, and exports in the background.

By adjusting export parameters dynamically, Exchange administrators can avoid restarting large or time-consuming export operations, improving performance and minimizing potential data loss.

Syntax

As per Microsoft’s official documentation, the syntax for Set-MailboxExportRequest is:

Set-MailboxExportRequest

-Identity <MailboxExportRequestIdParameter>

[-AcceptLargeDataLoss]

[-BadItemLimit <Unlimited>]

[-CompletedRequestAgeLimit <Unlimited>]

[-DomainController <Fqdn>]

[-LargeItemLimit <Unlimited>]

[-Priority <RequestPriority>]

[-RehomeRequest]

[-Suspend]

[-SuspendWhenReadyToComplete]

[-Confirm]

[-WhatIf]

Parameters

Below is a concise explanation of the main parameters you can use with Set-MailboxExportRequest:

  • Identity - Specifies the export request to modify. You can identify it by name, alias, or GUID (for example, MailboxExportRequest01).
  • BadItemLimit - Sets how many corrupted items can be skipped during the export before the process fails.
  • LargeItemLimit - Defines how many large items can be skipped. Useful when mailboxes contain oversized attachments or messages.
  • AcceptLargeDataLoss - Confirms that a high number of skipped items (bad or large) is acceptable.
  • RequestPriority - Sets the priority of the export process (for example, Low, Normal, High).
  • Suspend - Suspends the export request.
  • SuspendWhenReadyToComplete - Pauses the export request just before completion, allowing for manual review or scheduling.
  • RehomeRequest - Moves the request to a different Mailbox Replication Service (MRS) instance or server.
  • CompletedRequestAgeLimit - Specifies how long a completed request should remain before it’s automatically removed.
  • DomainController - Identifies the domain controller to use when making Active Directory changes.
  • Confirm - Prompts for confirmation before running the command.
  • WhatIf - Simulates the command without making actual changes.

Practical Uses

Here are three common, real-world scenarios where administrators use Set-MailboxExportRequest in Exchange PowerShell:

1. Handling corrupted or large mailbox items

During a mailbox export, the process may fail because of corrupted messages or attachments that exceed size limits. Instead of recreating the entire export job, administrators can use Set-MailboxExportRequest to adjust the BadItemLimit and LargeItemLimit parameters.

This allows the export to continue while skipping problematic items, reducing downtime and avoiding repeated restarts. The AcceptLargeDataLoss switch must be used if the limits are set high, ensuring that administrators consciously allow the export to proceed even if a substantial number of items are skipped. This approach is especially valuable in large or legacy mailboxes where data integrity issues are expected.

2. Adjusting request priority to manage workload

In Exchange environments with multiple ongoing mailbox exports or migrations, server resources can become constrained. Using Set-MailboxExportRequest, administrators can modify the RequestPriority of specific jobs to ensure time-sensitive exports complete first. For instance, compliance-related exports for HR or legal teams can be assigned a higher priority than routine backups.

Changing the priority dynamically helps manage the Mailbox Replication Service (MRS) task queue efficiently without needing to stop or restart other export requests. It provides finer control over performance, ensuring that important mailbox data is processed ahead of less critical tasks.

3. Suspending or resuming export jobs for maintenance or verification

When Exchange servers or file shares (UNC paths) used for export are scheduled for maintenance, administrators can temporarily pause export requests using the Suspend or SuspendWhenReadyToComplete parameters. This ensures that the export operation does not fail mid-transfer due to service interruptions. Once maintenance is complete or target storage is verified, the request can be resumed using Resume-MailboxExportRequest without data loss.

This is also useful in compliance workflows, where exports are paused just before completion to allow validation of exported data before the PST file is finalized. Such control helps maintain data consistency and prevents corruption during infrastructure changes.

Prerequisites

Before using Set-MailboxExportRequest, ensure the following requirements are met:

  • Exchange Server version: The cmdlet is supported in Exchange Server 2010 SP1 and later (including Exchange 2013, 2016, and 2019). It’s not available in Exchange Online or Microsoft 365.
  • Role-based access control (RBAC): The user must be assigned the Mailbox Import Export management role.
  • File share permissions: The Exchange Trusted Subsystem group must have Read/Write access to the target UNC path (for example, ServerPSTExports).
  • Exchange Management Shell: Commands must be executed in the Exchange Management Shell with administrator privileges.
  • Mailbox Replication Service (MRS): MRS must be running on at least one Exchange Mailbox server.
  • Proper network path configuration: The export target must be accessible from the server handling the export.


How to Use Set-MailboxExportRequest

This section walks through the most common administrative tasks using Set-MailboxExportRequest with step-by-step instructions and command examples.

1. Modify Export Limits for Failed Requests

Command:

Set-MailboxExportRequest -Identity "JamesSmithMailboxExportRequest01" -BadItemLimit 50 -LargeItemLimit 20 -AcceptLargeDataLoss

If a mailbox export fails due to bad or large items, you can increase the limits and allow the export to proceed.

Explanation:

This command modifies the export request for user John Smith to allow up to 50 corrupted items and 20 large items to be skipped. The AcceptLargeDataLoss switch confirms that skipping these items is acceptable. This helps avoid repeated failures during mailbox export due to problematic messages or attachments.

2. Change Priority or Suspend/Resume a Request

Command:

Set-MailboxExportRequest -Identity "SupportTeamMailboxExportRequest02" -RequestPriority High -SuspendWhenReadyToComplete $true

You can manage the order in which exports are processed using RequestPriority, or temporarily pause an export with SuspendWhenReadyToComplete.

Explanation:

Here, the export request is given high priority so it’s processed sooner. The SuspendWhenReadyToComplete flag pauses the export near completion, letting administrators verify destination PST files or ensure compliance before finalizing the export.

3. Rehome or Resume an Export Request

Command:

Set-MailboxExportRequest -Identity "HRTeamMailboxExportRequest03" -RehomeRequest

Sometimes an export request needs to be moved to another Mailbox Replication Service instance, such as when a server is under heavy load.

Explanation:

This command reassigns the export process to another available MRS instance, optimizing performance or avoiding stalled requests on a busy server. It’s particularly useful in larger Exchange environments with multiple Mailbox servers.

4. Adjust Completed Request Retention

Command:

Set-MailboxExportRequest -Identity "AuditUserMailboxExportRequest01" -CompletedRequestAgeLimit 15.00:00:00

Administrators can control how long completed export requests are kept before automatic cleanup.

Explanation:

This retains the completed export request for 15 days before it’s automatically removed from the system. It helps keep the export queue clean while allowing time for review or verification.

Final Note

The Set-MailboxExportRequest cmdlet is a valuable management tool for Exchange administrators handling mailbox exports to PST files. By modifying existing MailboxExportRequest jobs, admins can optimize performance, manage large data sets, and ensure smooth, reliable exports from Microsoft Exchange Server.

Combined with related cmdlets like Get-MailboxExportRequest and New-MailboxExportRequest, it provides full control over the export request lifecycle - from creation to completion - helping maintain compliance, reduce downtime, and safeguard mailbox data integrity.