Commands › Exchange Online

Remove-MailboxImportRequest

Exchange Online ExchangeOnlineManagement Remove-*

Remove fully or partially completed import requests. Completed import requests aren't automatically cleared. Requests need to be removed by using the Remove-MailboxImportRequest cmdlet. Multiple import requests can exist against the same mailbox if you provide a distinct import request name. NOTE: This cmdlet is no longer supported in Exchange Online. To import a .pst file in Exchange Online, see Use network upload to import PST files. 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 informatio

Quick start script

# Remove-MailboxImportRequest — 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-MailboxImportRequest
$before | Format-List

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

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

Syntax — 2 parameter sets

Identity

Remove-MailboxImportRequest [-Identity] <MailboxImportRequestIdParameter>
 [-Force]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-WhatIf]
 [<CommonParameters>]

MigrationRequestQueue

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

Parameters (7)

ParameterTypeRequiredWhat it controls
-Identity MailboxImportRequestIdParameter yes The Identity parameter specifies the identity of the import request. By default, import requests are named `<alias>\MailboxImportX` (where X = 0-9). If you created the request using the Name parameter, use the...
-RequestGuid Guid yes This parameter is available only in on-premises Exchange.
-RequestQueue DatabaseIdParameter yes This parameter is available only in on-premises Exchange.
-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 This parameter is available only in on-premises Exchange.
-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.