How To Use the PowerShell Set-MailboxExportRequest Cmdlet?
The PowerShell Set-MailboxExportRequest
cmdlet is used to modify the settings of an existing mailbox export request in Exchange Server. Here’s how to use it:
- Open the Exchange Management Shell by running it as an administrator.
- Use the
Get-MailboxExportRequest
cmdlet to get the details of the mailbox export request that you want to modify. For example, to get the details of a mailbox export request with the name “MailboxExportRequest01”, run the following command:Get-MailboxExportRequest -Name MailboxExportRequest01
- Use the Set-MailboxExportRequest cmdlet to modify the settings of the mailbox export request. The available parameters include:
- ContentFilter: Specifies a filter for the items to be exported.
- FilePath: Specifies the file path where the exported data will be saved.
- BadItemLimit: Specifies the maximum number of bad items that can be encountered before the export request fails.
- AcceptLargeDataLoss: Indicates whether to allow the export to continue even if a significant amount of data loss occurs.
- Verify that the changes have been made by using the Get-MailboxExportRequest cmdlet again to retrieve the details of the modified mailbox export request.
For example, to modify the mailbox export request “MailboxExportRequest01” to include only items from the Inbox folder and save the exported data to the “C:\Exports” folder, run the following command:
Set-MailboxExportRequest -Identity MailboxExportRequest01 -ContentFilter {(All -eq $false) -and (Subject -like ‘Inbox/*’)} -FilePath “C:\Exports\MailboxExportRequest01.pst”