How to use “Search Mailbox” & Export to PST in Exchange Server
Summary: Exchange Server comes packed with a ton of inbuilt utilities that assist administrators to perform complex tasks, such as exporting mailboxes to PST by using Mailbox Import Export cmdlets. However, this requires expert technical knowledge and permissions to execute such commands. In this guide, we have discussed the ‘Search-Mailbox’ cmdlet with steps to use the cmdlet for mailbox export.
An Exchange database can be a storehouse of thousands of user mailboxes. Often, situations arise that demand database administrators (DBAs) to perform various operations on these mailboxes, such as exporting them to a PST format. It may be required to create a backup of the mailbox or migrate the mailbox to another server or Outlook account. Further, DBAs might require to export mailbox to PST in a complex situation such as following,
“When setting up email forwarding, an error in the settings resulted in the sender’s mailbox not having any copy of the forwarded emails. To rectify this mistake, the user wanted to receive back all the mails sent out during the forward.”
In a situation like this, DBAs require to perform search operations on the mailbox of the user where the mails were forwarded to. After finding the required mailbox, PST can be exported and then imported to the sender’s mailbox. This way, the mails can be retrieved. The PowerShell command that is used for the purpose is Search-Mailbox.
NOTE: Although you can search and export mailboxes to PST via Mailbox Import Export cmdlets, it often involves risk factors like data loss. That’s the reason a majority of DBAs prefer Stellar Converter for EDB to find and export Exchange mailboxes to Outlook PST format easily and efficiently.
PowerShell “Search-Mailbox” Command
The PowerShell Search-Mailbox command is available in both on-premise and cloud Exchange. However, some parameters and settings could be different. This cmdlet is used to search messages in a specified mailbox and thereafter to perform any of the following tasks:
- Copy the searched messages to a specified target mailbox
- Delete searched messages from the source mailbox (For this, you have to be assigned the “Mailbox Import Export Management Role”)
- Perform single item recovery to recover items from a user’s ‘Recoverable Items’ folder
- Clean up the ‘Recoverable Items’ folder for a mailbox when it has reached the hard quota
So, if an Exchange DBA faces the need to export a specific user mailbox or mail items from EDB file into another format like PST, the Search-Mailbox cmdlet is a feasible way to do it.
How to Use Search-Mailbox Cmdlet to Export to PST?
To use the Search-Mailbox cmdlet, the user must be assigned with Mailbox Search or Mailbox Import Export roles. By default, these roles aren’t assigned to any user, including administrators. Thus, to use the Search-Mailbox cmdlet, assign any of these roles to the user account. However, if you want to delete the searched mailbox items, save them to the target mailbox, or export them to PST, assign both roles.
The syntax of the Search-Mailbox cmdlet is:
Search-Mailbox [-Identity] [-EstimateResultOnly] [-Confirm] [-DomainController <Fqdn>] [-DoNotIncludeArchive] [-Force] [-IncludeUnsearchableItems] [-SearchDumpster] [-SearchDumpsterOnly] [-SearchQuery <String>] [-WhatIf] [<CommonParameters>]
For a better understanding of how to use Search-Mailbox to find and export mailbox items to PST, here’s an example of the cmdlet in action:
Search-Mailbox -Identity “John Doe” -SearchQuery “Subject: Project Hamilton” -TargetMailbox “DiscoveryMailbox” -TargetFolder “JohnDoe-ProjectHamilton” -LogLevel Full
Once the mails are saved in the target mailbox, you can export the saved emails from the target mailbox to PST via the New-MailboxExportRequest cmdlet.
However, to use the cmdlet, you must know the source and target mailbox. Also, the network path to save the exported PST.
NOTE: You can’t export PST by using Search-Mailbox cmdlet. You must use the New-MailboxExportRequest cmdlet to create PST export request, post saving the searched mail items in the target mailbox.
Limitations of using Search-Mailbox Cmdlet
While the usage of Search-Mailbox to find specific mail items and export them to PST looks fairly simple, the entire approach suffers from a few limitations,
- You need to be assigned specific permissions and roles to execute the cmdlet
- Improper usage of the cmdlet may lead to unexpected data loss
- The command is a bit too technical for users who don’t have prior experience in working with command line procedures as complex as this one or who aren’t fully aware of the parameters that are to be used along with the cmdlet
To overcome these limitations, Exchange experts recommend using a much efficient technique to export EDB content to PST format. This technique involves the use of reliable and advanced EDB to PST Converter software to convert mailbox contents saved within the EDB file into Outlook importable PST format.
The Safest Alternative to Search-Mailbox cmdlet
Stellar Converter for EDB is the most viable method of accomplishing safe and accurate EDB to PST conversion in Exchange. The tool proficiently converts online (Hosted) as well as offline EDB files into Outlook PST files without hampering with mailbox format or structure. It converts the mailboxes to PST with 100% integrity and precision. Besides, it also recovers deleted mailboxes from the database file.
A few prominent features of the software include,
- It extracts single or multiple mailboxes as per user need
- Recovers accidentally deleted mailboxes
- Exports offline EDB file to Live Exchange Server or Office 365 accounts
- Options to save converted mailbox items, such as emails in a variety of formats like EML, MSG, RTF, PDF, & HTML
In addition to these advanced features, the software comes laced with an interactive and intuitive GUI, which makes its operation extremely easy. Plus, it doesn’t require any additional permissions or roles and lets you directly search and export specific mail items to PST. Also, you can download the free demo version to scan, preview, and search converted mailboxes before saving to PST.
Steps to export specified target mailboxes by using this software
- Download, install and launch Stellar Converter for EDB
- Select Hosted Exchange (for online EDB) or Offline EDB option.
- Then use ‘Select’ or ‘Find’ button to choose the EDB file for PST conversion.
- Click on ‘Start’ to initiate the scanning process. This may take a while to complete depending upon the size of the EDB file.
- When the EDB file finishes scanning, all recoverable data will be displayed in a tree-view list in the software’s left-hand side panel. Different mailboxes will be displayed as a folder which when clicked will expand to show the various folders like Inbox, Sent Items, Calendars, etc. in the software’s middle panel.
- You can preview any item from any mailbox folder by clicking on it. The preview will be shown in the right-hand panel of the software’s interface.
- You can also use the search bar to find the required mailbox items.
- Once you find the required mail items, select the items and click on ‘Save’ from the file menu.
- When prompted, select PST or any desired option from output formats.
- Then choose a destination to save the converted file.
- Click on ‘OK’ to start saving the mails in the desired format at your specified location.
When the process finishes, your selected mailbox items will be saved in the format of your choice at the destination you picked.
Final Words
Search-Mailbox cmdlets help find the specific mail items from mailboxes in Exchange database file (EDB) and save them to another mailbox. You may also use the cmdlet to delete the specific mails. However, it requires assigned roles and permissions for the user to perform these operations.
Moreover, exporting mailbox or mail items from Exchange via Mailbox Import Export cmdlet requires technical knowledge and the use of a powerful tool, such as PowerShell. It also possesses a risk of data loss.
But all this can be avoided by using an EDB to PST converter tool, such as Stellar Converter for EDB. It doesn’t require special privileges or permissions. Plus, anyone can use the software to search and save emails to PST or other desired format as long as they have access to the server database file. It supports both Online and Offline database files and, unlike Search-Mailbox cmdlet, the software is compatible with Exchange 2019, 2016, 2013, 2010, 2007, 2003, 2000, and 5.5.
Hello, when I try to run the search-mailbox, success is set to false, it does not give an error, it only gets false, what can it be?
Please make sure that you have assigned specific permissions.
Hi Eric,
I have the necessity to recover a .edb file into a .pst or other format file, I have only the hard disk with the file. There is a way to extract the mail from the edb file? Like a trial.
Is there a way to export Exchange 2010 mailboxes to PST files without using Powershell Search-Mailbox command?
I want to export a pst from a mailbox user. How can I do this from Exchange Server manually?
Hi Timothy,
You can try PowerShell commands to achieve this requirement. But, you should act this process carefully under the review of experienced PowerShell expert.
Anybody answer me about how can I export EDB file into PST file without paying a single penny?
Hello Donna,
Its free demo is limited for a preview of result only.
Thanks for showing your interest in Stellar Converter for EDB.
I am familiar with PowerShell “Search-Mailbox” Command but prefer Stellar Converter for EDB to ensure 100% safe conversion.