Recover emails from an OST file

Outlook for Microsoft 365, Outlook 2021, Outlook 2019, Outlook 2016, Outlook 2013

You can use the OST PST Viewer (pstwalker.exe) to search for and recover emails from an Offline Outlook Data File (.ost). The OST PST Viewer can open orphaned, corrupted, encrypted, and password protected .ost files. Supported command line switches: export emails from an .ost file to .msg, .eml files or .pst file; find and recover hard deleted and orphaned items.

You might want to recover emails from an OST file in the following situations:

The reason for these errors and other problems in synchronizing might be a corrupted OST file. According to the articles above, Microsoft recommends that you delete your .ost file and that you let Outlook redownload the information from the server that is running Microsoft Exchange Server. After the mailbox is synchronized, test to see whether the issue still occurs.

Information: After deleting the .ost file, any items that are saved locally will be lost. For example, Calendar, Contacts, Tasks, and any folders marked Local only. In this situation, we recommend that you backup your existing .ost file.

In some cases, emails may not be recovered from the Exchange Server. An alternative to rebuild the OST file is to export the data to an Outlook Data File (.pst) or MSG File Format (.msg).

How to recover data from .ost file?

  1. Close Microsoft Outlook and all other mail-enabled applications that may use your Outlook mailbox.
  2. Download the OST PST Viewer, and run it on your computer.
  3. Browse the .ost file you want to recover and click Open.
  4. Select mailbox folder in All Folders pane, and preview all your items including messages, contacts, appointments, tasks, notes, and journal entries.
    Recover emails from an OST file
  5. Go to File > Export.
  6. Choose PST - Outlook Data File as file format and All items in this folder and subfolders.
    Export options
  7. Select destination folder and click Ok.
  8. Wait for the export to finish.

Now you can find the recovered data from OST file in the destination .pst file.

Are there any limits when recover data from .ost file?

There is no limit on the number and size of the recovered OST files. You can convert unlimited folders or files as often as you like. You need PST Walker Business License in order to process the .ost file type.

Command line switches

The program can bulk recover emails from OST file in batch scripts using PowerShell, Task Scheduler and other automation tools. To do this, use the command line options of the product.

Note: Command line parameters are not available in the Home license.

   [-HardDeleted | -HardDeletedOnly]


The filename parameter specifies the .pst and .ost files to process. A filename mask can be applied, e.g. c:\users\*.pst

The E parameter specifies the file format for the saved messages. Exports to a file of the specified format:
  • msg - .msg file format
  • umsg - unicode .msg file format
  • eml - .eml(rfc 822) file format
  • pst - .pst Outlook Data File
  • mbox - .mbox Mozilla Thunderbird file format
The Name parameter specifies the naming style for the saved messages:
  • Id - incremental Id
  • EntryId - PR_ENTRYID (unique message identifier)
  • Subject - message subject
Specifies search query, see search keywords and boolean search operators

Specifies destination folder for bulk extracted messages

Extensive scan (to recover data from a damaged or a corrupted .pst, .ost files)

Find 'hard deleted' and 'orphaned' items

Export only 'hard deleted' and 'orphaned' items

Create .log file in ExportPath folder


Example 1

cd "C:\Program Files (x86)\PST Walker\"
$PSTFiles = @("c:\a.ost", "c:\b.ost") foreach ($PST in $PSTFiles){ .\pstwalker.exe "$PST" --% -E:pst -SearchQuery:'from:( OR "bobby moore")'-ExportPath:"D:\PST-Exports\" }

This example searches c:\a.ost and c:\b.ost mailboxes for items in which the e-mail address equals OR sender name contains bobby moore. The search results are exported to D:\PST-Exports\a.pst and D:\PST-Exports\b.pst

When running native commands from PowerShell, the arguments are first parsed by PowerShell. Beginning in PowerShell 3.0, you can use the stop-parsing (--%) token to stop PowerShell from interpreting input as PowerShell commands or expressions.

Example 2

Command Prompt
cd C:\Program Files (x86)\PST Walker\
pstwalker.exe c:\users\*.pst -E:eml -ExportPath:"D:\PST-Queries\" -SearchQuery:'subject:"Your bank statement"' -FullScan -HardDeleted

This example searches all .pst files in c:\users folder for messages and hard deleted messages that contain the phrase "Your bank statement" in the subject. The search results are exported as .eml files to D:\PST-Queries\.

Updated on December 06, 2021

Facebook Email

See Also

How to use PST Walker

This guide explains how to open, find and extract emails from .pst files and .ost files with portable PST Viewer.

Convert OST to PST

You can use this guide to convert OST to PST file format, in case of data loss on the mail server, or when you need to recover a deleted, orphaned or inaccessible OST file.

Search multiple .pst and .ost files without Outlook

Boolean search, Excel-like filtering, instant search. Supports any .pst and .ost files: corrupted, orpah, archive, password protected and encrypted files. Export search results to numerous formats.

How to recover emails in Outlook for Microsoft 365

Learn how to troubleshoot missing data or emails in Outlook for Microsoft 365, and the steps to recover them if possible. Recover deleted messages in a user's mailbox in Exchange Online.