Best Way to Use New-MailboxExportRequest PowerShell Command In Exchange Server

  • Written By  

  • Updated on January 23rd, 2023

Exchange Server is the main server that works under the supervision of Microsoft for the transmission of emails. Users are keen to perform various operations with the Exchange Server while using it, like importing and exporting the email PST files. Recently, Microsoft has come up with the latest MailboxExportRequest PowerShell command to export the Exchange Server emails to the PST files of Outlook.

The tech giant came up with this to export the Exchange server emails because it acknowledges the need for backup in today’s times. Also, Exchange is not so flexible when it comes to options for backing up emails. It has some limited approaches to choose from.

In this blog, we will be providing you the best way you can utilize the Powershell export command in Powershell for the export of Exchange Server emails. It is a cmdlet that is only offered only on the on-premises Exchange. Moreover, it also helps the users to archive the Exchange primary emails from the server.

However, it is not easy to perform the task using the MailboxExportRequest PowerShell command, and you need to perform several prerequisites to complete it. Do not worry we will guide you through the complete process so that you can execute it easily. But before that, let us understand the reason to export Exchange Servers emails to PST files.

Reason to Export Exchange Server to PST 

Below-mentioned are the most common reasons to export the Microsoft server emails to PST using the Windows Powershell commands.

  • To have a backup of the emails in time of need. The emails exported as PST files can help users to keep the emails safe if some mishap happens.
  • If you need to archive your mailbox to a local file, you can simply export it as an Outlook PST file.
  • Due to organizational shifts, users have to shift to the Outlook email client that forces them to shift their Exchange server emails to the PST file format of Outlook.
  • If a user faces any problem with the mailbox on the server. The error can be fixed by shifting to PST.

All the above reasons compel the users to transfer the Exchange Server mailbox to PST. Now, let us see the process to do the same using the MailboxExportRequest PowerShell command.

Executing MailboxExportRequest Command of Powershell

The MailboxExportRequest command cannot be executed directly as some prerequisites need to be completed for it. 

To start with, you need to first give the rights to export the user mailbox. In the Exchange Server, even the administrator account does have the default right to export the mailboxes. So, you need to access the rights to each account.

Additionally, there is a need to create a share to export to a PST file. You cannot export a PST file to a random location, and you need to share it on the server or the PC. The steps to perform these prerequisites for the MailboxExportRequest PowerShell command procedure are given below.

Prerequisites to Grant Permissions

  • Open the Exchange Admin Center and log in using the admin credentials.
  • Click on permissions, and under that, select Admin Roles.
  • Press the Plus(+) icon.
  • Now, under Display Name, double click on Mailbox Import Export.
  • After that, hit the OK button.
  • At last, add the user that will export the data and press Save.

Prerequisites to Share Location 

To provide the shared location to the server, you need to share the folder that you have added for the PST files to the user who has access rights. Furthermore, the Exchange Trusted Subsystem is also required to be added for the permissions and provided full read/write permissions.

Approach to Use MailboxExportRequest PowerShell Command

The Powershell MailboxExportRequest command can allow you to export all your Exchange Server mailboxes. You can run Powershell script and enter the following command accurately.

New-MailboxExportRequest -Mailbox User1 -FilePath \\EX01\PSTFiles\User1.pst

The export command Powershell will automatically start the export of each mailbox to the PST file, and you can see the progress of the procedure. Once the process is complete, you will see the result as Completed. In case of any issues, it will display, failed or in progress. Perhaps, it can take some time to complete. 

For Transferring Single and Multiple Folders

If a user wants to transfer a particular single folder from the mailbox, then you can use the below command.

New-MailboxExportRequest -Mailbox User1 -FilePath \\EX01\PSTFiles\User1.pst-IncludeFolders “#Inbox#”

However, if you want to export more than one folder, then enter the below command.

New-MailboxExportRequest -Mailbox User1 -FilePath \\EX01\PSTFiles\User1.pst-IncludeFolders “#Inbox#”, “#Sent Items#”

There is also a provision to exclude a particular folder. If a user wishes to exclude single or multiple folders, you can use the below command.

 New-MailboxExportRequest -Mailbox User1 -FilePath \\EX01\PSTFiles\User1.pst-ExludeFolders “#Inbox#”, “#Sent Items#”

In addition to all the above commands, you can also export the Exchange Server mailbox to the PST files according to the Date Range. Various MailboxExportRequest PowerShell commands assist you to perform selective migration of server emails. Some of these commands are given below.

Command 1:

New-MailboxExportRequest -ContentFilter {(Received -lt ’01/01/2018′)} -Mailbox User1 -Filepath \\EX01\PSTFiles\User1lt.pst

Command 2:

New-MailboxExportRequest -ContentFilter {(Received -gt ’01/01/2018′)} -Mailbox User1 -Filepath \\EX01\PSTFiles\User1lt.pst

Command 3:

New-MailboxExportRequest -ContentFilter {(Received -lt ’01/01/2020′)-and (Received -gt ’01/01/2019′)} -Mailbox User1 -Filepath \\EX01\PSTFiles\User1range.pst

All these commands will help you to perform the migration either from a particular mentioned date to the date or between the mentioned dates.

You can take the use of the MailboxExportRequest PowerShell command to perform the migration of Exchange Server emails to PST files of Outlook. Besides, it can be a complex method to execute for various users. There can be problems for novice users as there is a need for having prior knowledge to go through with the manual method.

If you wish to overcome all these constraints, you can directly go for an alternate solution, i.e., EDB to PST Converter. It is flawless software to export your Exchange Server EDB files to Outlook PST file without any hassle. It saves a lot of time for the users, and it is equipped with a smooth GUI to enhance the user experience.

Conclusion

Here, the best way to use the MailboxExportRequest PowerShell command has been described. It is a proven way to export Exchange Server mailboxes to PST files of Outlook. There is also a use of the PowerShell command to export to CSV format. Although it is quite difficult to perform, that does not make it apt for some users. A professional third-party EDB to PST Converter tool has been suggested that makes the whole migration process easy.

About The Author:

Related Post