Recovering emails from an OST file

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

For most types of accounts, such as IMAP, Microsoft 365, Exchange, and, an Offline Outlook Data File (.ost) is used to store a synchronized copy of your mailbox information on your local computer. In some situations, such as network outages or data corruption, you may need to recover emails from an OST file. In this article, we will discuss some methods to recover emails from an OST file.

Note: In Outlook 2013 and earlier versions, IMAP accounts used an Outlook Data File (.pst).

Rebuilding the OST file

In earlier versions of Outlook, Microsoft previously recommended using the Scanost.exe tool for errors that occur with your offline Outlook Data File (.ost). The Scanost.exe tool is no longer available starting in Outlook 2010. Microsoft now recommends deleting your offline Outlook Data File (.ost) and letting Outlook redownload the information from the server. You might want to rebuild the .ost file in the following situations:

The reason for these errors and other problems in synchronization might be corruption in the .ost file, and in some cases, emails may not be synchronized from the server. When all you have is an ost-file and you can't access your email account via Outlook at the moment anymore either, an alternative to rebuilding the .ost file is to extract the data.

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

Extracting data from the OST file

If you encounter Outlook connection issues or cannot rebuild your .ost file, there are several tools available that can help you recover data from an OST file. These tools can extract emails from .ost files without requiring Microsoft Outlook or a server account connection. They can help you recover important emails, contacts, tasks, and other data from your OST file and save it in various file formats for future use.

Exporting emails using OST PST Viewer

OST PST Viewer can open orphaned, corrupted, encrypted, and password-protected OST files. With this tool, you can export emails from an OST file to various file formats, including MSG, EML, and PST. Follow these steps to export emails from an 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 the file format for export and All items in this folder and subfolders.
    Export options
  7. Select the destination folder and click Ok.
  8. Wait for the export to finish.

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.

Recovering emails from an OST file using PowerShell

The program can bulk recover emails from an 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 is not available with a Home license.

Usage: pstwalker-cli [command] [options]

Command: export
Description: Export items from .pst and .ost files to various formats

  -f, -file      File(s) to be exported. Specify the path to the .pst or .ost file(s), supporting wildcard characters (*?)
  -e, -format    File format for extracted messages: msg, umsg, eml, pst, mbox (optional; default: msg)
  -n, -name      Naming convention for saved messages: id, entryId, subject (optional; default: subject)
  -q, -query     Search query for filtering messages (optional)
  -p, -path      Destination path for extracted messages (optional)
  -fullscan      Perform an extensive scan for damaged or corrupted files (optional)
  -harddel       Find 'hard deleted' and 'orphaned' items (optional)
  -harddelonly   Export only 'hard deleted' and 'orphaned' items (optional)
  -mkdir         Create an individual directory for each exported file (optional)
  -srcfolders    Preserve the source folder structure (optional)
  -empty         Include empty folders in the export (optional)
  -storename     For pst: Specify the display name of the new Outlook data file (optional)
  -destfolder    For pst: Destination Outlook root folder for exported folders and items (optional; default: IPM Root Folder)
  -split         For pst: Create dedicated PST files for each folder (optional)
  -headers       For mbox, eml: Save internet transport headers (optional)
  -mode          Overwrite mode (optional; default: rename)
                   For msg, umsg, eml: rename, overwrite, skip
                   For pst: rename, append
                   For mbox: rename, overwrite, append
  -l, -log       Create a log file in the destination folder (optional)


Example 1

cd "C:\Program Files (x86)\PSTWalker Software\OST PST Viewer\"
$OSTFiles = @(Get-ChildItem "c:\outlook data files\").VersionInfo.FileName foreach ($OST in $OSTFiles){ .\pstwalker-cli.exe export -f "$OST" -e pst --% -q 'from:( OR "bobby moore")'-p "D:\PST-Exports\" }

This example searches all mailboxes in "c:\outlook data files" folder for items in which the e-mail address equals OR sender name contains bobby moore. The search results are exported to "D:\OST-Exports".

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)\PSTWalker Software\OST PST Viewer\
pstwalker-cli.exe export -f c:\users\*.ost -e eml -p "D:\PST-Queries\" -q 'subject:"Your bank statement"' -fullscan -harddel

This example searches all .ost 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:\OST-Queries".

Updated on August 07, 2023

Facebook Email

See Also

PST Walker Viewer: Guide

This guide provides step-by-step instructions on how to use PST Walker Viewer. Learn how to navigate the interface, open and search for emails, extract attachments, and more.

Convert OST to PST

Convert OST to PST using three efficient methods that can convert multiple OST files to PST files. Handles corrupted, orphaned, archive, and encrypted .ost files without requiring Microsoft Outlook or a server account connection.