Repair Corrupted Outlook .pst/.ost Data File

Prev Next

Diagnose and fix Outlook startup errors caused by corrupted local data files.

Complexity: Intermediate. Impact: end-user-impacting + data-integrity + workstation.

Why use this workflow

Outlook stores mailbox data locally in two file types: .pst (Personal Storage Table, used for POP accounts, archives, and imported data) and .ost (Offline Storage Table, a cached copy of an Exchange/Microsoft 365 mailbox). When these files become corrupted due to abrupt shutdowns, disk errors, oversized files, or synchronization conflicts, Outlook typically fails to open with errors such as:

  • "The file <path>.ost is not an Outlook data file (.ost)."
  • "Cannot start Microsoft Outlook. Cannot open the Outlook window. The set of folders cannot be opened."
  • "Errors have been detected in the file. Quit Outlook and all mail-enabled applications, and then use the Inbox Repair Tool."

This workflow walks through repairing or rebuilding the affected data file. Because .ost files are merely a local cache of a server-side mailbox, the safest remedy is usually to rename the file and let Outlook rebuild it. .pst files, however, contain authoritative data and must be repaired with scanpst.exe (the Inbox Repair Tool).

Expected outcomes

  • Outlook launches successfully without data-file errors.
  • Corrupted .ost files are rebuilt from the server mailbox (no data loss for Exchange/M365 accounts).
  • Corrupted .pst files are repaired with scanpst.exe and a backup preserved.
  • You have a documented path for recurring corruption (profile recreation, OST size monitoring).

Risks and considerations

Important warnings

  • Always back up the .pst file before running scanpst.exe. The tool modifies the file in place and can occasionally make corruption worse.
  • Do NOT delete a .pst file without confirming its contents are archived elsewhere. .pst data is not stored on the server.
  • Removing an .ost is safe only when the account is an Exchange, Microsoft 365, or IMAP account that syncs from the server. Verify account type first.
  • Very large .ost files (>50 GB) are a common cause of recurring corruption. Consider reducing cached mail range (e.g., to 12 months) after recovery.
  • Running scanpst.exe on a file currently in use by Outlook will fail. Close Outlook completely (check Task Manager for OUTLOOK.EXE) before starting.
  • If the user has Personal Archive or Online Archive mailboxes, those are separate and not affected by local file repair.

Required permissions

PermissionWhy it's needed
Local administrator on the user's workstationRequired to access Outlook data file locations under the user profile and to run repair tools.
User's mailbox credentialsNeeded to re-sign in to Outlook after the .ost file is rebuilt.

Ask Dex

Paste the prompt into a Dex conversation.

Prompt for IT admins

Outlook on {user}'s workstation won't open due to a corrupted data file error. Identify whether the affected file is a .pst or .ost, back it up, then repair the .pst with scanpst.exe or rebuild the .ost from the server mailbox. Confirm Outlook launches successfully afterward.

How an end user can ask Dex

Outlook won't open on my computer - it keeps showing an error about my Outlook data file.

Manual steps (admin center)

Step 1: Identify the failing data file

  1. Note the exact error message shown when Outlook starts. It usually includes the full path to the offending file.
  2. Open Control Panel > Mail (Microsoft Outlook) > Data Files… to see all configured files and their types (PST vs OST).

Step 2: Close Outlook completely

  1. Exit Outlook.
  2. Open Task Manager (Ctrl + Shift + Esc) and end any lingering OUTLOOK.EXE process.

Step 3a: Repair a .pst file (authoritative data)

  1. Locate SCANPST.EXE. Typical paths:
    • Microsoft 365 / Outlook 2021: C:\Program Files\Microsoft Office\root\Office16\SCANPST.EXE
    • Outlook 2019/2016: C:\Program Files (x86)\Microsoft Office\root\Office16\SCANPST.EXE
  2. Copy the target .pst file to a safe backup location.
  3. Launch SCANPST.EXE, click Browse, select the .pst file, and click Start.
  4. When errors are reported, ensure Make backup of scanned file before repairing is checked, then click Repair.
  5. Re-run Scanpst until it reports no errors (may take several passes).
  6. Reopen Outlook.

Step 3b: Rebuild a .ost file (server-cached data)

  1. Confirm the account is Exchange / Microsoft 365 / IMAP (server-backed) via Control Panel > Mail > Email Accounts.
  2. Go to the OST location: %LOCALAPPDATA%\Microsoft\Outlook
  3. Rename the problem file from username@domain.ost to username@domain.ost.old.
  4. Reopen Outlook. It will rebuild the OST and re-download mailbox contents from the server.

Step 4: If Outlook still won't start, recreate the profile

  1. Go to Control Panel > Mail > Show Profiles…
  2. Click Add…, create a new profile, and configure the user's email account.
  3. Set Always use this profile to the new profile and launch Outlook.

Step 5: Preventive follow-up

  • In Outlook: File > Account Settings > Account Settings > Change… and reduce Download email for the past: to 12 months for large mailboxes.
  • Recommend the user shut down Outlook cleanly before rebooting the computer.

Microsoft Graph API

Not applicable for this workflow. Outlook data-file corruption is a local workstation issue. The .pst/.ost files live on the user's device and are repaired with on-device tools. There is no Microsoft Graph or REST endpoint to repair a local Outlook profile. If mailbox-level corruption is suspected on the server side (rare), an admin can use Graph/EXO to move the mailbox between databases, but that is a separate workflow. Use the manual approach on the affected machine.

PowerShell

The workstation-side remediation can be scripted. It closes Outlook, backs up the data file, and either launches scanpst.exe (for .pst) or renames the .ost so Outlook rebuilds it on next launch.

Approach

  1. Take a target file path and an operation mode (PST repair or OST rebuild).
  2. Terminate any running OUTLOOK.EXE process.
  3. Create a timestamped backup copy of the file.
  4. For a PST repair: locate SCANPST.EXE across known Office install paths and launch it interactively.
  5. For an OST rebuild: rename the .ost with a .old suffix so Outlook regenerates it.

Run the steps in an elevated PowerShell window on the user's machine.