Commands › Exchange Online

New-MailboxImportRequest

Exchange Online ExchangeOnlineManagement New-*

Begin the process of importing a .pst file to a mailbox or archive. **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 information, see Add a role to a role group.

Quick start script

# New-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)
New-MailboxImportRequest -Mailbox <MailboxLocationIdParameter> -AzureBlobStorageAccountUri <Uri> -AzureSharedAccessSignatureToken <String> -WhatIf
New-MailboxImportRequest -Mailbox <MailboxLocationIdParameter> -AzureBlobStorageAccountUri <Uri> -AzureSharedAccessSignatureToken <String>

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

Syntax — 2 parameter sets

Default

New-MailboxImportRequest [-Mailbox] <MailboxLocationIdParameter> -FilePath <LongPath>
 [-AcceptLargeDataLoss]
 [-AssociatedMessagesCopyOption <FAICopyOption>]
 [-BadItemLimit <Unlimited>]
 [-BatchName <String>]
 [-CompletedRequestAgeLimit <Unlimited>]
 [-Confirm]
 [-ConflictResolutionOption <ConflictResolutionOption>]
 [-ContentCodePage <Int32>]
 [-DomainController <Fqdn>]
 [-ExcludeDumpster]
 [-ExcludeFolders <String[]>]
 [-IncludeFolders <String[]>]
 [-InternalFlags <InternalMrsFlag[]>]
 [-IsArchive]
 [-LargeItemLimit <Unlimited>]
 [-MigrationMailbox <MailboxIdParameter>]
 [-MRSServer <Fqdn>]
 [-Name <String>]
 [-Priority <RequestPriority>]
 [-RequestExpiryInterval <Unlimited>]
 [-SkipMerging <SkippableMergeComponent[]>]
 [-SourceEndpoint <MigrationEndpointIdParameter>]
 [-SourceRootFolder <String>]
 [-Suspend]
 [-SuspendComment <String>]
 [-TargetRootFolder <String>]
 [-WhatIf]
 [-WorkloadType <RequestWorkloadType>]
 [<CommonParameters>]

AzureImportRequest

New-MailboxImportRequest [-Mailbox] <MailboxLocationIdParameter> -AzureBlobStorageAccountUri <Uri> -AzureSharedAccessSignatureToken <String>
 [-AzureStatusPublishEndpointInfo <String>]
 [-AcceptLargeDataLoss]
 [-AssociatedMessagesCopyOption <FAICopyOption>]
 [-AzureStatusPublishEndpointInfo <String>]
 [-BatchName <String>]
 [-CompletedRequestAgeLimit <Unlimited>]
 [-Confirm]
 [-ConflictResolutionOption <ConflictResolutionOption>]
 [-ContentCodePage <Int32>]
 [-ExcludeDumpster]
 [-ExcludeFolders <String[]>]
 [-IncludeFolders <String[]>]
 [-IsArchive]
 [-MigrationBatch <MigrationBatchIdParameter>]
 [-MigrationMailbox <MailboxIdParameter>]
 [-MigrationUser <MigrationUserIdParameter>]
 [-MRSContentFilterSasUri <Uri>]
 [-Name <String>]
 [-RequestExpiryInterval <Unlimited>]
 [-SkipInitialConnectionValidation]
 [-SkipMerging <SkippableMergeComponent[]>]
 [-SourceEndpoint <MigrationEndpointIdParameter>]
 [-SourceRootFolder <String>]
 [-SuspendComment <String>]
 [-Suspend]
 [-TargetRootFolder <String>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (37)

ParameterTypeRequiredWhat it controls
-Mailbox MailboxLocationIdParameter yes The Mailbox parameter filters the results by the destination mailbox where the content is being imported to.
-AzureBlobStorageAccountUri Uri yes This parameter is available only in the cloud-based service.
-AzureSharedAccessSignatureToken String yes This parameter is available only in the cloud-based service.
-FilePath LongPath yes This parameter is available only in on-premises Exchange.
-AcceptLargeDataLoss SwitchParameter The AcceptLargeDataLoss switch specifies the request should continue even if a large number of items in the source mailbox can't be copied to the target mailbox. You don't need to specify a value with this switch.
-AssociatedMessagesCopyOption FAICopyOption The AssociatedMessagesCopyOption parameter specifies whether associated messages are copied when the request is processed. Associated messages are special messages that contain hidden data with information about...
-AzureStatusPublishEndpointInfo String This parameter is available only in the cloud-based service.
-BadItemLimit Unlimited This parameter is available only in on-premises Exchange.
-BatchName String The BatchName parameter specifies a descriptive name for importing a batch of mailboxes. You can use the name in the BatchName parameter as a string search when you use the Get-MailboxImportRequest cmdlet.
-CompletedRequestAgeLimit Unlimited The CompletedRequestAgeLimit parameter specifies how long the request is kept after completion before being automatically removed. The default value is 30 days.
-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.
-ConflictResolutionOption ConflictResolutionOption The ConflictResolutionOption parameter specifies what to do if there are multiple matching messages in the target. Valid values are:
-ContentCodePage Int32 The ContentCodePage parameter specifies the specific code page to use for an ANSI pst file. ANSI pst files are used in Outlook 97 to Outlook 2002. You can find the valid values in the [Code Page...
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-ExcludeDumpster SwitchParameter The ExcludeDumpster switch specifies whether to exclude the Recoverable Items folder. You don't need to specify a value with this switch.
-ExcludeFolders String[] The ExcludeFolders parameter specifies the list of folders to exclude during the import.
-IncludeFolders String[] The IncludeFolders parameter specifies the list of folders to include during the import.
-InternalFlags InternalMrsFlag[] This parameter is available only in on-premises Exchange.
-IsArchive SwitchParameter The IsArchive switch specifies that you're importing the .pst file into the user's archive. You don't need to specify a value with this switch.
-LargeItemLimit Unlimited This parameter is available only in on-premises Exchange.
-MigrationBatch MigrationBatchIdParameter This parameter is available only in the cloud-based service.
-MigrationMailbox MailboxIdParameter, AzureImportRequest This parameter is reserved for internal Microsoft use.
-MigrationUser MigrationUserIdParameter This parameter is available only in the cloud-based service.
-MRSContentFilterSasUri Uri This parameter is available only in the cloud-based service.
-MRSServer Fqdn The MRSServer parameter specifies the FQDN of the Client Access server on which the instance of the Microsoft Exchange Mailbox Replication service (MRS) is running. This parameter is used for debugging purposes only....
-Name String The Name parameter specifies the name of the specific request for tracking and display purposes. Because you can have multiple import requests per mailbox, Exchange precedes the name with the mailbox's alias. For...
-Priority RequestPriority This parameter is available only in on-premises Exchange.
-RequestExpiryInterval Unlimited The RequestExpiryInterval parameter specifies an age limit for a completed or failed request. When you use this parameter, the completed or failed request is automatically removed after the specified interval...
-SkipInitialConnectionValidation SwitchParameter This parameter is available only in the cloud-based service.
-SkipMerging SkippableMergeComponent[] The SkipMerging parameter specifies steps in the import that should be skipped. This parameter is used primarily for debugging purposes.
-SourceEndpoint MigrationEndpointIdParameter This parameter is reserved for internal Microsoft use.
-SourceRootFolder String The SourceRootFolder parameter specifies the root folder of the .pst file from which data is imported. When specified, the folder hierarchy outside the value of the SourceRootFolder parameter isn't imported, and the...
-Suspend SwitchParameter The Suspend switch specifies whether to suspend the request. You don't need to specify a value with this switch.
-SuspendComment String The SuspendComment parameter specifies a description about why the request was suspended. You can only use this parameter if you specify the Suspend parameter.
-TargetRootFolder String The TargetRootFolder parameter specifies the top-level mailbox folder that the imported content is placed in. If you don't specify this parameter, the command imports folders to the top of the folder structure in the...
-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.
-WorkloadType RequestWorkloadType This parameter is available only in on-premises Exchange.

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