Table of Content
    EDB to PST Converter

    How to Take Exchange 2016/2013 Mailbox Backup Using PowerShell Cmdlets


    Table of Content

      Summary: This is an instructional guide on creating Exchange 2016 or Exchange 2013 server backup using the PowerShell cmdlets in Exchange Management Shell (EMS). It also discusses the benefits & drawbacks of the entire process and suggests an alternative backup solution for Exchange 2016 and 2013 mailbox databases.

      Taking a backup can curb data loss to a considerable extent. However, database administrators (DBAs) must follow a strict backup strategy to safeguard data against adverse conditions.

      For instance, the backup files must be stored carefully, preferably at least two copies – one onsite and another at an offsite location- so they can be restored in the instance of server failure or downtime.

      All Exchange Server editions come with backup capabilities. You can create a backup of the entire server, single or multiple Exchange databases, and individual or multiple mailboxes based on the organization’s needs.

      When it comes to backing up Exchange 2016 or Exchange 2013 mailbox, you can do it via,

      • Exchange Admin Center (EAC)
      • Exchange Management Shell (EMS) Cmdlets

      These allow you to back up individual or multiple Exchange 2013 or Exchange 2016 mailboxes at once in PST file format.

      This guide will discuss methods and steps to create an Exchange server mailbox backup using the PowerShell cmdlets in EMS.  

      Steps To Backup of Exchange 2016/2013 Mailbox via PowerShell Commands

      Admins can export single or multiple Exchange mailboxes to PST files using the New-MailboxExportRequest PowerShell command in the EMS.

      Step 1: Assign Mailbox Import Export Role

      The user should be a member of a role group with the Mailbox Import Export role added. Admin can use the following command to assign the Mailbox Import Export role to a specific user.

      New-ManagementRoleAssignment -Role “Mailbox Import Export” -User DomainName/UserName or alias

      Step 2: Create a Shared folder Location

      Also, create a shared folder location to save exported PST backup files from the mailbox. The steps are as follows:

      • Create a new folder on the server storage. Name it anything.
      • Right-click on the folder and choose to Give access to > Specific people…
      • Choose Find People and then search and add the username to who has Mailbox Import Export role assigned. You may also choose Everyone (not recommended).
      • Click OK and then click Share.
      •  
      create a shared folder location
      • Copy the shared folder path location displayed on the next screen.

      Step 3: Backup Individual Exchange 2013/2016 Mailboxes to PST

      Before you can export or backup an Exchange 2016 or Exchange 2013 mailbox to PST, you need to know the name of the mailbox.

      Execute the following command in Exchange Management Shell (EMS) to list all the mailboxes in your organization.

      Get-MailboxStatistics -Server YourExchangeServerName
      check the mailbox name before creating export requests

      Once you have the mailbox or mailboxes names, enter the following command to create mailbox backup at the shared folder location in PST format,

      New-MailboxExportRequest -Mailbox “MailBoxName” -FilePath \\Servername\SharedFolderPathName\FileName.pst
      create mailbox export request to save the mailboxes as pst file

      You can modify or limit the scope of exported contents by utilizing additional parameters. Below we have discussed a few useful parameters you can use while creating Exchange 2013 or Exchange 2016 mailbox backup in PST format.

      -ContentFilter Parameter

      For instance, the following command lets you export items received before 01-01-2020 with a subject beginning with ‘RE’,

      New-MailboxExportRequest -Mailbox “MailBoxName” -ContentFilter {(Received -lt ’01/01/2020′) -and (Subject –like ‘Re*’)} -FilePath \\Servername\SharedFolderPathName\FileName.pst

      -ExcludeFolders and -IncludeFolders Parameters

      For instance, the following command uses -IncludeFolder parameters to export only Inbox and Sent Items folders to PST for Exchange mailbox backup.

      New-MailboxExportRequest -IncludeFolders “#Inbox#/*”,”#SentItems#” -Mailbox “MailBoxName” -FilePath \\Servername\SharedFolderPathName\FileName.pst

      IsArchive Parameter

      It is a switch parameter that describes the archive as the only export medium.

      New-MailboxExportRequest -Mailbox “MailBoxName” -IsArchive -FilePath \\Servername\SharedFolderPathName\FileName.pst

      -Name Parameter

      The parameter is used to set a name for an export request. In addition, it is used for tracking individual requests when multiple export requests are executed.

      By default, Exchange assigns ten consecutive names to the export requests per mailbox. When all ten export requests are taken, the user is required to either remove the export requests or assign customized names using the –Name parameter to proceed further with Exchange 2016/2013 mailbox backup process.

      A single New-MailboxExportRequest command can contain more than one parameter to accomplish any particular operation.

      Step 4: Backup Multiple Exchange 2016/2013 Mailboxes to PST using PowerShell

      You can also back up multiple Exchange mailboxes by using the Foreach command. In addition, you may create and use a PowerShell script to back up selected users’ mailboxes at once or combine Foreach and Get-Mailboxes commands to back up all mailboxes in your organization.

      Create a variable to store all the mailboxes in your organization for backup.

      $ExchangeMailboxes = Get-Mailboxes

      Then enter the following command to export these user mailboxes to PST.

      $ExchangeMailbox|%{$_|New-MailboxExportRequest -FilePath \\Servername\SharedFolderPathName\$($_.Alias).pst}

      Alternatively, you can create a script with name “ExchangeMailboxes” containing usernames of specific mailboxes that you want to export or backup in Exchange 2016 or 2013 to PST format.

      $ExchangeMailboxes = “username1”,”username2”,…….,”usernameN”
      ($User in ($ExchangeMailboxes)) { New-MailboxExportRequest -Mailbox $User -FilePath \\Servername\SharedFolderPathName\$($User).pst" }

      The command starts creating backup of all or specific mailboxes in your Exchange 2016/2013 server at the Shared Folder location based on the command you use.

      How to Know It Worked?

      You can do so by using the following commands,

      Get-MailboxExportRequest -Mailbox “MailboxName” | Format-List
      Get-MailboxExportRequest -Status completed -Database RDB01

      The latter command displays completed request of backup in RDB01 database.

      To check the export progress, type the following command

      Get-MailboxExportRequestStatistics

      You may also go to the Shared Folder location to check the backup PST file.

      Pros and Cons of Creating Exchange 2016 or 2013 Backup Using PowerShell Cmdlets

      Although PowerShell commands help you back up Exchange mailboxes and give you more control over the Exchange server, it may not always work. There are a few drawbacks and advantages of this method that you should know.

      Pros

      • Converts EDB mailboxes to PST with mailbox filtering capabilities
      • Supports bulk conversion of EDB mailboxes to PST altogether
      • Modify PST export requests during the backup

      Cons

      • The backup process via PowerShell commands is lengthy and time-consuming
      • Demands expertise and permissions for the execution of the export task
      • Requires a huge amount of space in server storage media
      • Involves the risk of PST corruption
      • No preview is available for incorporated EDB contents
      • Lack of centralized management of backup strategies and tasks
      • Risk of huge data loss is involved due to typos

      As an administrator, if you want to avoid these complexities involved in manual EDB to PST conversion via PowerShell commands, you can use an EDB to PST Converter tool such as Stellar Converter for EDB. The software allows you to export single or multiple mailboxes to PST file format and help you back up Exchange 2016/2013 mailbox with a few clicks.

      Conclusion

      EMS or Exchange Management Shell is a command-line shell built on top of PowerShell to perform various Exchange administrator tasks and operations, such as backup. Exchange Admin Center (EAC) features a GUI interface, which makes it easy to back up and export mailboxes from the Exchange database to PST format. However, EAC offers only limited options for backup. Plus, if you want to run other procedures, they can only be performed via Exchange Management Shell. In a nutshell, PowerShell cmdlets give you better control over Exchange backup.

      However, it requires additional permissions to execute certain commands and works only when the database is offline. Thus, it can lead to downtimes.

      Fortunately, you can create an Exchange backup and avoid downtime using an EDB to PST converter software, such as Stellar Converter for EDB. The software can create a backup from online and offline Exchange databases without hindering the Exchange services.

      After creating a backup of Exchange mailboxes in PST format, create at least two copies of each mailbox backup, one onsite and one offsite at another location. For maximum resilience against data loss, you may also follow the 3-2-1 backup strategy.

      In case you find any issue or problem with the PowerShell-based backup method or software, please leave a comment.

      Was this article helpful?

      No NO

      About The Author

      Eric Simson linkdin

      Eric Simson is an Email Platform Consultant and is associated with Stellar Data Recovery from last 6 years. He writes about the latest technology tips and provides custom solutions related to MS Outlook, MS Exchange Server, Office 365, and many other Email Clients & Servers.

      20 comments

        1. PowerShell commands should be executed under the supervision of an experienced administrator. For bulk requirement, you should go for a third party software.

      1. Our team size is very small and we can’t afford a full-time administrator for the backup process.

        Suggest any affordable solution for our small scale business.

      2. I hate PowerShell Command due to technical Jargons. I think third party software is more reliable option for administrators.

        1. Don’t waste your time with PowerShell Query if you are a beginner or looking for 100% safe migration. You can try free demo of Stellar Converter for EDB.

      3. Thank you for your article!! My only problem is that I want to export 100 mailboxes to PST file. I know Mailbox Import Export but it gets failed to export mailboxes. I don’t know where the problem is. Do you know any other solution that would allow me to export mailboxes to pst.?

        1. There are two cases in which Mailbox Import Export get failed:
          1) Large Items: There are emails larger than the message size limits you have set for the Exchange Transport components, connectors, etc. Since the default size limit is 10MB, any emails in the mailbox larger than 10MB will cause the Import Export to fail.
          2) Bad Items – Corrupt messages in the PST.
          Please try Stellar Converter for EDB demo version; if it shows the preview of mailboxes then it will definitely export your mailboxes into PST format.

      4. The command “New-MailboxExportRequest” isn’t available for Exchange Online. Is it any script on the on-premises Exchange server that export mailboxes to Exchange Online? What method can I use in this case?

        1. You can use Stellar Converter for EDB to export mailboxes from on-premises Exchange Server to Exchange Online.

      5. I have moved Exchange Server 2007 mailboxes to Exchange Server 2013. Now we are planning to decommission of Exchange Server 2007. But want to maintain Exchange Server 2007 backup for next 5-7 years. In this case, what would be the best option?

        1. In this case, you either need to keep the server running, or create duplicate same Active directory /Exchange in the same environment for restoration. If you don’t want to do this, alternatively, you can use Stellar Converter for EDB to backup Exchange mailboxes data into PST file format.

      6. Great Information!! Export Mailboxes to PST using powershell cmdlets is not so easy. This is quite time-consuming. I used Stellar Converter for EDB as suggested by you. I exported mailboxes to PST easily in a quick time. Thanks for the solution!!

        1. Yes you can take backup of employees mailboxes by converting EDB files to PST files. You can easily do it by using Stellar Converter for EDB Software.

      Leave a comment

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

      Image Captcha
      Refresh Image Captcha

      Enter Captcha Here :

      Related Posts

      WHY STELLAR® IS GLOBAL LEADER

      Why Choose Stellar?

      • 0M+

        Customers

      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+

        Countries

      • 0+

        PARTNERS

      • 0+

        Awards Received