How to Convert EDB to PST Using PowerShell Commandshttps://saasbring.com/

Several reasons may prompt you to convert Exchange Database (EDB) files stored in the Exchange Servers to Personal Storage Table (PST). For instance, you may want to migrate mailbox to Office 365 or another server, recover your data from a damaged or corrupted file, or archive old data to free server space and improve Exchange performance. 

To perform the conversion for any of these purposes, you can proceed with manual methods, such as by using Exchange admin Center (EAC) or PowerShell commands in the Exchange Management Shell. Alternatively, you may also opt for professional EDB to PST converter software to execute this task. In this blog, we will discuss converting EDB to PST through PowerShell commands.

Prerequisites to Convert EDB to PST Using PowerShell Commands 

Before starting the conversion process, you must adhere to the major prerequisites and set the required permissions and roles for data export. 

Assign the Import/Export role

This is possible through EAC or EMS. Here are both the methods

Using EAC

  • Login to your Exchange Server account
  • Click on Permissions > Admin Roles
    Click Plus (+) button to create a new Import/Export role
  • Add the user to perform the data export 
  • Assign the new role to the user

Using EMS PowerShell commands

The following command will help you to assign the roles:

New-ManagementRoleAssignment –Role “Mailbox Import Export” –User “<Username>”

New-ManagementRoleAssignment -Role “Mailbox Import Export” -SecurityGroup “Organization Management” -Name “Import Export

Create a Shared folder that you will use to export the data

  • Set up a shared folder with a valid UNC path to act as the destination for data export.  
  • Set the share and security permissions to enable the Exchange Trusted Subsystem gain complete access to the folder.

 Convert EDB Data to PST using PowerShell commands

To export a specific mailbox to PST, use the PowerShell commands in the EMS as given below.

1. PowerShell Command to export a selected mailbox to PST

New-MailboxExportRequest -Mailbox ‘<mailbox>’ -Filepath “<unc patch><pstfile>.pst”

It will display the status as queued. 

2. Command to monitor the status of Export request

You can monitor the status of Export request, in terms of InProgress, completed, or failed, use Get-MailboxExportRequest. Here is the command: 

Get-MailboxExportRequest -Status InProgress -Database TestDB01

This command will return the export request status for mailboxes exported to PST from TestDB01 Exchange database. You may replace the InProgress status with other options from the list given below, to filter your export requests.

  • AutoSuspended
  • Completed
  • CompletedWithWarning
  • CompletionInProgress
  • Failed
  • InProgress
  • Queued
  • Retrying
  • Suspended

To export filter based mailbox data, you may try any of the below examples

  1. Commands to export mailbox while excluding or included selected mailbox folders

    These commands will exclude or included the specified mailbox folders for the export request.

Exclude folders

The command to exclude folders for mailbox export request is as follows: 

New-MailboxExportRequest -Mailbox ‘user’ -Filepath “\\ex01\PSTFiles\User_Export.pst” -ExcludeFolders “#Drafts#”, “#Outbox#”

Include folders

Export mailbox while including selected mailbox folders

New-MailboxExportRequest -Mailbox ‘user’ -Filepath “\\ex01\PSTFiles\User_Export.pst” -IncludeFolders “#Drafts#”, “#Outbox#”

Exclude/include folders options

The list below names the mailbox folders that you can exclude or include in the export request:

  • Inbox
  • SentItems
  • DeletedItems 
  • Calendar 
  • Contacts
  • Drafts
  • Journal 
  • Tasks 
  • Notes 
  • JunkEmail
  • CommunicatorHistory 
  • Voicemail 
  • Fax 
  • Conflicts 
  • SyncIssues 
  • LocalFailures 
  • ServerFailures

Date based Mailbox Export request

  1. To export data up to a specific date, use the following command:

New-MailboxExportRequest -ContentFilter {(Received -lt ’01/03/2025′)} -Mailbox <mailbox name> -Filepath “unc patch of destination file”

  1. To export mailbox data beyond a specific date, use the below command:

    New-MailboxExportRequest -ContentFilter {(Received -gt ’01/03/2025′)} -Mailbox <mailbox name> -Filepath “unc patch of destination file”
  2. To export sent or received emails within a selected data range.

New-MailboxExportRequest -ContentFilter {(Received -lt ’01/03/2025′) -and (Received -gt ’01/03/2024′)} -Mailbox <mailbox name> -Filepath “unc patch of destination file 

It will fetch the emails between March 1, 2024 and March 1, 2025

After executing any of these commands, use Get-MailboxExportRequest to get the status of the exports.

Limitations with the manual EDB to PST conversion

The EAC or PowerShell commands in the Exchange Management allow you to convert mailbox data in the EDB to PST. But these methods are not applicable if you want to export public folders. To perform this task, you will require Outlook, but it may consume considerable time based on the size of the folder you want to export. Here are more risks of adopting Manual EDB to PST conversion methods:

  • Require you to seek the requisite permissions and role assignments
  • Run the risk of data loss, partial data  migration and data inconsistency
  • Lack of support for unmounted database files
  • May not recover data from the damaged or corrupt database files 
  • Needs the database to be online in the Exchange Server environment
  • Needs high end technical expertise to deal with the issues regarding PowerShell cmdlets

Convert EDB to PST Using professional EDB to PST converter software

To avoid such hassles and to save your time, you may opt for third party professional EDB to PST converter software. These tools are effective in resolving the errors quickly and efficiently. Among the many applications available in the market, Stellar Converter for EDB is a thinkable option for this purpose. It can convert EDB files to PST without any file size limitation. Besides, it can also export offline EDB files and public folders to PST or Microsoft 365, which is not possible in the manual methods.

Conclusion

Several reasons may prompt you to convert EDB to PST, such as to recover data from a corrupted EDB file, migrate mailbox, archive obsolete data, etc. To server this purpose, you may try manual methods, such as Exchange Admin Center (EAC) or the Power Shell commands in the Exchange Management Shell environment. Before proceeding with any method, you should take care of the major prerequisites. 

These may include the import/export role assignment to the user, creating a shared folder with a valid UNC path for data export, and so on. When using PowerShell commands, you can use the New-MailboxExportRequest cmdlet to initiate the request. To find the status of the export request, use Get-MailboxExportRequest cmdlet with different parameters. 

You may also export data based on date by using ContentFilter followed by lt, gt and other parameters with the specific dates. However, these manual methods accompany several limitations, such as the need for technical expertise, risk of data loss, no support for offline files, and more. 

To avoid these limitations, confiding in a professional EDB to PST converter software, such as Stellar Converter for EDB will be a feasible move.

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *