New-mailbox Export Request

0 views
Skip to first unread message

Jacinda Saleeby

unread,
Aug 3, 2024, 3:25:49 PM8/3/24
to encecorwha

This cmdlet is available only in the Mailbox Import Export role, and by default, the role isn't assigned to any role groups. 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.

You can create more than one mailbox export request per mailbox, and each mailbox export request must have a unique name. Microsoft Exchange automatically generates up to 10 unique names for a mailbox export request. However, to create more than 10 export requests for a mailbox, you need to specify a unique name when creating the export request. You can remove existing export requests with the Remove-MailboxExportRequest cmdlet before starting a new request with the default request name \MailboxExportX (where X = 0-9).

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

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.

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 rules, views, and forms. By default, associated messages are copied. This parameter accepts the following values:

The BadItemLimit parameter specifies the maximum number of bad items that are allowed before the request fails. A bad item is a corrupt item in the source mailbox that can't be copied to the target mailbox. Also included in the bad item limit are missing items. Missing items are items in the source mailbox that can't be found in the target mailbox when the request is ready to complete.

Valid input for this parameter is an integer or the value unlimited. The default value is 0, which means the request will fail if any bad items are detected. If you are OK with leaving a few bad items behind, you can set this parameter to a reasonable value (we recommend 10 or lower) so the request can proceed. If too many bad items are detected, consider using the New-MailboxRepairRequest cmdlet to attempt to fix corrupted items in the source mailbox, and try the request again.

The BatchName parameter specifies a descriptive name for exporting a batch of mailboxes. You can use the name in the BatchName parameter as a string search when you use the Get-MailboxExportRequest cmdlet.

Important: You can't use this parameter to export between two dates. If you try, you'll get system convert errors. You can export from a specific date, or export to a specific date, but not both.

The ContentFilter parameter uses OPATH filter syntax to filter the results by the specified properties and values. Only contents that match the ContentFilter parameter will be exported into the .pst file. The search criteria uses the syntax "Property -ComparisonOperator 'Value'".

Valid input for this parameter is a supported culture code value from the Microsoft .NET Framework CultureInfo class. For example, da-DK for Danish or ja-JP for Japanese. For more information, see CultureInfo Class.

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 (FQDN). For example, dc01.contoso.com.

The LargeItemLimit parameter specifies the maximum number of large items that are allowed before the request fails. A large item is a message in the source mailbox that exceeds the maximum message size that's allowed in the target mailbox. If the target mailbox doesn't have a specifically configured maximum message size value, the organization-wide value is used.

Valid input for this parameter is an integer or the value unlimited. The default value is 0, which means the request will fail if any large items are detected. If you are OK with leaving a few large items behind, you can set this parameter to a reasonable value (we recommend 10 or lower) so the request can proceed.

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. Use this parameter only if directed by support personnel.

The Name parameter specifies the name of the specific request for tracking and display purposes. Because you can have multiple export requests per mailbox, Exchange precedes the name with the mailbox's alias. For example, if you create an export request for a user's mailbox that has the alias Kweku and specify the value of this parameter as PC1toArchive, the identity of this export request is Kweku\PC1toArchive.

If you don't specify a name using this parameter, Exchange generates up to 10 request names per mailbox, which is MailboxExportX (where X = 0-9). The identity of the request is displayed and searchable as \MailboxExportX.

The Priority parameter specifies the order in which the request should be processed in the request queue. Requests are processed in order, based on server health, status, priority, and last update time. Valid priority values are:

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 expires. If you don't use this parameter:

The TargetRootFolder parameter specifies the top-level folder in which to export data. If you don't specify this parameter, the command exports folders to the top of the folder structure in the target .pst file. Content is merged under existing folders, and new folders are created if they don't already exist in the target folder structure.

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

The HighPriority parameter filters the results based on the Priority value that was assigned when the request was created. Valid input for this parameter is $true or $false. Here's how these values filter the results:

The Identity parameter specifies the identity of the export request. By default, export requests are named \MailboxExportX (where X = 0-9). If you specified a name for the export request when the request was created using the New-MailboxExportRequest cmdlet, use the following syntax: Alias\Name. Exchange automatically precedes the request with the mailbox's alias.

The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.

When disabling users I typically will be asked to retain a copy of their mailbox. I accomplish this by literally creating their mailbox in Outlook and then exporting to PST. Is there some way around having to do this just to save a mailbox?

In Exchange SP2, it does not warn you that you have not set role assignments, it just fails. So be sure to create a management role for "Mailbox Import Export" and add your user to the group, then restart PowerShell for this to take effect.

It will request a filepath, which is relative to the Exchange server holding the mailbox, and must be accessibly by the same user that the store.exe process is running as (typically the machine account). It will also ask for the Mailbox, specify by the alias.

And cleanup after your export when it's done with Remove-MailboxExportRequest. It's usually best to run this as Remove-MailboxExportRequest -Status Competed so any failed or pending requests are left to run or be examined.

Edit 2:
That error apparently can also be generated if you don't have permission to import/export. Check your Exchange Role and be sure you have those permissions. - Thanks to jshin47 for that.

If you inspect closely, you will find that the assignment grants Organization Management members like you only delegation rights. This allows you, as an organization administrator, to decide who can run Mailbox Import Export cmdlets.

In my example, the Administrator account is assigned to a Role Group called Organization Management. That group has access to the role Mailbox Import Export Delegating. We have to add the admin account to the role.

Go to Active Directory and open the OU Microsoft Exchange Security Groups in the root domain of the forest. A new Universal Security Group is created with the name Exchange Mailbox Import Export.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages