Commands › Exchange Online

Remove-MailboxExportRequest

Exchange Online ExchangeOnlineManagement Remove-*

Remove fully or partially completed export requests. You can create multiple export requests for a specified mailbox provided that you specify a distinct name. Completed export requests aren't cleared automatically; they need to be removed by using this cmdlet. To use this cmdlet, you need to add the Mailbox Import Export role to a role group (for example, to the Organization Management role group). For more information, see Add a role to a role group. When a partially completed export request is removed, content already exported isn't removed from the PST file. If you want to start a new expo

Quick start script

# Remove-MailboxExportRequest — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-MailboxExportRequest
$before | Format-List

# 3. Make the change (dry run first)
Remove-MailboxExportRequest -Identity <MailboxExportRequestIdParameter> -RequestGuid <Guid> -RequestQueue <DatabaseIdParameter> -WhatIf
Remove-MailboxExportRequest -Identity <MailboxExportRequestIdParameter> -RequestGuid <Guid> -RequestQueue <DatabaseIdParameter>

# 4. Verify and diff
$after = Get-MailboxExportRequest
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

Identity

Remove-MailboxExportRequest [-Identity] <MailboxExportRequestIdParameter>
 [-Force]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-WhatIf]
 [<CommonParameters>]

MigrationRequestQueue

Remove-MailboxExportRequest -RequestGuid <Guid> -RequestQueue <DatabaseIdParameter>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Identity MailboxExportRequestIdParameter yes The Identity parameter specifies the identity of the export request. By default, export requests are named `<alias>\MailboxExportX` (where X = 0-9). Use the following syntax: `Alias\Name`.
-RequestGuid Guid yes The RequestGuid parameter specifies the unique identifier for the export request. To find the export request GUID, use the Get-MailboxExportRequest cmdlet. If you specify the RequestGuid parameter, you must also...
-RequestQueue DatabaseIdParameter yes The RequestQueue parameter identifies the request based on the mailbox database where the request is being run. You can use any value that uniquely identifies the database. For example:
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-Force SwitchParameter The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.