Pages

Tuesday, December 8, 2020

Extract & Export Exchange Mailbox to PST Using PowerShell

How to Extract & Export Exchange Mailbox to PST Using PowerShell

An Exchange mailbox is used to store information like contacts, emails, calendar, events, etc. This information stored on the server can be retrieved & updated with the help of email clients. There are times when there is a need to extract and export Exchange mailbox to PST using PowerShell cmdlet to migrate Exchange data so that it can be accessed offline. Also in case of corruption issue in the Exchange mailbox due to virus attack or hardware failure, the user may migrate or export Exchange mailbox data to a different platform like PST.



Rapid Solution: The Exchange Export Tool provided by SysTools which is mainly designed to extract & export Exchange mailbox to PST from Live Exchange Server 2016/2013/2010/2007/2003 within few simple clicks. It is capable to export disabled, disconnected, enabled, exclude dumpster, hosted, corrupt, and journal mailboxes with all data items to Outlook data file in a simplified way. Users can easily export Exchange 2010 mailbox to PST along with other versions of MS Exchange.

exchange export tool

Converting Exchange mailbox to PST file is one of the options in order to extract and access mailbox data in Microsoft Outlook. This can be done using two ways via Exchange Admin Center & PowerShell command.


Here, we will discuss the PowerShell method to extract and export mailbox to PST file.

Export Single Exchange Mailbox to PST Using PowerShell

Single or multiple mailbox can be exported from Exchange Server into PST file by following different set of commands in the PowerShell. Exporting mailbox contents to a PST file is achieved using the New-MailboxExportRequest cmdlet, which is a set of command in PowerShell.

Before exporting Exchange database mailbox to Outlook PST file, first user have to provide the Mailbox Import Export role and then they have to create the shared folder & provide the read/write permission to the Exchange Trusted Subsystem security group of that folder

Enter the following command to provide Export or Import role:

mailbox import export powershell command

Provide the Full control to the Exchange Trusted subsystem security group in the shared folder where users are exporting the required Exchange mailbox.

assign read and write permission

Now enter the New-MailboxExportRequest command using below syntax

New-MailboxExportRequest -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst

Example:

powershell command to export mailbox to pst


Resultant File:

output file

After running this command, the mailbox is exported into PST file, which is saved in the directory the user has entered in the file path.

Additional Parameters To Extract & Export Exchange Mailbox to PST Using PowerShell

There are also some parameters, which limit the amount of exported contents from Exchange Mailbox to PST.

Content Filter

Specifies what conditions the contents of a mailbox have to match to be exported into the PST file. Example of a script that exports items received prior to 2015-01-01 with subjects beginning with fwd:


New-MailboxExportRequest -Mailbox <user> -ContentFilter {(Received -lt '01/01/2015') -and (Subject -like 'fwd*')} -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst

Exclude and Include Folders

The user can also export selective folders from Exchange mailbox. There are also two interesting features available to extract Exchange mailboxes:

  • The capability to filter personal folders located under root folders using the <FolderName>/* syntax.
  • The capability to filter custom Exchange mailbox folders regardless of their name in a local language using the #<FolderName>#/* syntax.

New-MailboxExportRequest -IncludeFolders "#Inbox#/*","#SentItems#" -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst


IsArchive

It defines the archive as the only source of the export option.

New-MailboxExportRequest -Mailbox <user> -IsArchive -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst


Name

It sets the name of an export request, which is Useful for tracking. By default, Exchange assigns only 10 consecutive names to export requests related to a single mailbox (starting with MailboxExport through MailboxExport9) and then stops.

 

To proceed when all the 10 default export request names have been taken, users have to either flush the export requests or start assigning Name parameter.


New-MailboxExportRequest -Name <unique name> -Mailbox <user> -IsArchive -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst


Export Multiple Exchange Mailbox to PST File Using PowerShell

At times more than one mailbox has to be exported to PST file. The procedure for this is almost the same as the case with a single mailbox, except for a few changes in the commands.



Follow the below mentioned steps:
1. Save all the mailboxes with a variable.
$AllMailboxes = Get-Mailbox
2. Export all mailboxes to PST files with names based on mailbox aliases.

$AllMailboxes|%{$_|New-MailboxExportRequest -FilePath \\<server FQDN>\<shared folder name>\$($_.Alias).pst}

command to export multiple exchange mailbox to pst

Output File:

resultant file


Additional parameters can be used just as in single mailbox exports.

Limitation of PowerShell

1. Cannot export Offline/Dismounted Exchange mailboxes to PST file

2. Exchange PowerShell doesn't work properly with corrupt/unhealthy Exchange database file and mailbox

3. This manual solution requires hands-on experience and technical knowledge 

Note: You can use the Exchange Mailbox Recovery Software provided by SysTools to export the Exchange offline/dismounted mailboxes to Outlook PST file. It easily recover minimal and major corrupt Exchange database file as well as recover Exchange mailbox with no data loss and export directly to the Live Exchange Server mailboxes, Office 365 and EML, HTML, PDF, MBOX, MSG, PST file format.

exchange recovery software

Conclusion

PowerShell is a good option for exporting Exchange Mailbox to PST, which can be opened in MS Outlook easily. However, it should be kept in mind that it has its own limitations. We hope that the article will help the users to understand the methods used to extract & export Exchange Mailbox to PST using PowerShell cmdlet for single as well as multiple mailboxes.

For any query or suggestions on extracting Exchange mailbox to PST, do comment.


0 comments:

Post a Comment

Post a reply