Remember the Export-Mailbox command on exchange 2007??? The main problem I personally had was the annoying outlook requirement.
With the exchange server 2010 service pack 1 release, M$ introduced a new Cmdlet to export mailboxes on the server. And it does not require outlook.
New-MailboxExportRequest
Step 01 – Mailbox Import Export Role Assignment
Grant the user account permissions to export mailboxes (By default no account has the privileges to export mailboxes)
New-ManagementRoleAssignment -Role “Mailbox Import Export” -User administrator
Step 02 – Setup the Export File Location
Note:
The Cmdlet gives an error if you point to a directory directly on the Hardisk (Eg – F:PST_export)
Create a Shared folder on a serverNAS and grant Exchange Trusted Subsystem user account read/write permissions to the folder
Exporting Mailbox Items with “New-MailboxExportRequest”
Supporting Cmdlets that can be used with MailboxExportRequest
Cmdlet
|
Description
|
Topic
|
Start the process of exporting a mailbox or personal archive to a .pst file. You can create more than one export request per mailbox. Each request must have a unique name.
|
||
Change export request options after the request is created or recover from a failed request.
|
||
Suspend an export request any time after the request is created but before the request reaches the status of Completed.
|
||
Resume an export request that’s suspended or failed.
|
||
Remove fully or partially completed export requests. Completed export requests aren’t automatically cleared. You must use this cmdlet to remove them.
|
||
View general information about an export request.
|
||
View detailed information about an export request.
|
In this example
Shared folder name- PST_export
server name- EXCH01
Share Path – \Exch01PST_export
Mailbox – amy.webber
Folder permissions –
For this example we are going to use New-MailboxExportRequest cmdlet with the following parameters :
-baditemlimit 200 -AcceptLargeDataLoss
AcceptLargeDataLoss
|
The AcceptLargeDataLoss parameter specifies that a large amount of data loss is acceptable if the BadItemLimit is set to 51 or higher. Items are considered corrupted if the item can’t be read from the source database or can’t be written to the target database. Corrupted items won’t be available in the destination mailbox or .pst file.
|
baditemlimit
|
The BadItemLimit parameter specifies the number of bad items to skip if the request encounters corruption in the mailbox. Use 0 to not skip bad items. The valid input range for this parameter is from 0 through 2147483647. The default value is 0.
|
Exporting the Whole Mailbox
Run the following Cmdlet to initiate the mailbox move request: New-MailboxExportRequest
New-MailboxExportRequest -baditemlimit 200 -AcceptLargeDataLoss -Mailbox amy.webber -FilePath \Exch01PST_exportamy.webber.pst
Exporting the User’s Online Archive
If you want to export the user’s online archive to .pst, use the –IsArchive parameter.
New-MailboxExportRequest -baditemlimit 200 -AcceptLargeDataLoss -Mailbox amy.webber -IsArchive -FilePath \Exch01PST_exportamy.webber-Archive.pst
Exporting a Specific Folder
You can export a folder from the users mailbox using the -IncludeFolders parameter
Eg: inbox folder layout-
To export the inbox folder
New-MailboxExportRequest -baditemlimit 200 -AcceptLargeDataLoss -Mailbox amy.webber -IncludeFolders #Inbox# -FilePath \Exch01PST_exportamy.webber.pst
Checking the Progress of the Mailbox Export Request
To check the current statues of the mailbox export request use the following cmdlet:
Get-MailboxExportRequest | Get-MailboxExportRequestStatistics
People do crazy stuff scripting with this Cmdlet. Look around in the interwebs for some scripts.
Useful links:
Until next time…