If Outlook says it cannot open your data file, the Inbox Repair tool (scanpst.exe) is the first thing to try. Close Outlook, copy the .pst file somewhere safe, run scanpst.exe, point it at the file with Browse, choose Start, and select Repair if it reports errors. Then reopen Outlook and check the Lost and Found folder for items the tool could not put back.
Who this is for and what you will have at the end
This guide is for anyone who keeps mail in a .pst file: an archive, an old POP or IMAP account, or an export from a previous job. It is also for IT staff who get the "Outlook won't open my PST" ticket. By the end you will have a safe copy of the file, a repaired file or a clean new one, and a way to move recovered items into a healthy data file.
If your mail lives in a Microsoft 365 or Exchange mailbox, the PST is usually not the problem. See the OST section further down, and the guide on Outlook stuck loading profile if Outlook hangs at startup instead of showing a PST error.
What the Inbox Repair tool does and does not do
Microsoft describes the Inbox Repair tool as a way to diagnose and repair errors in an Outlook data file. It only looks at local files. It does not connect to, or analyze data stored in, an Exchange mailbox. Microsoft lists cases such as Outlook refusing to open the data file or the set of folders as reasons to run it.
Be realistic about the limits:
- It repairs the file structure. It cannot bring back items that were permanently deleted.
- Microsoft states that items may not be recovered if they are corrupted beyond repair.
- It can need more than one run to clear all errors.
- Microsoft's multi-pass page says there is no support for networked .pst files, so work on a local copy.
Before you start: protect the original
Microsoft recommends backing up your Outlook data file before you start the Inbox Repair tool. The tool makes its own .bak copy during repair, but your own copy is the one you control.
- Close Outlook completely. Check Task Manager for a leftover
OUTLOOK.EXEprocess. - Find the file. In Outlook, go to File > Account Settings > Account Settings, then open the Data Files tab and note the path. If Outlook will not start, check the default folder. For Outlook 2016 and newer, Microsoft lists
drive:\Users\user\Documents\Outlook Files\archive.pst; for earlier versions,drive:\Users\user\AppData\Local\Microsoft\Outlook\archive.pst. - Copy the file to another folder or drive. Make sure the destination has at least as much free space as the PST.
- Repair the copy and keep the original untouched, or repair the original only after the copy exists.
Never repair a PST that sits on a network share. Copy it to a local disk first.
Step-by-step: repair a PST with scanpst.exe
These steps follow Microsoft's repair page for Outlook Data Files.
- Exit Outlook.
- Browse to the folder that contains SCANPST.EXE. Microsoft's page lists
C:\Program Files (x86)\Microsoft Office\root\Office16for Outlook 2019 and 2016. It does not list a location for Outlook in Microsoft 365, 2021 or 2024. If the file is not there, search underC:\Program FilesandC:\Program Files (x86)for SCANPST.EXE. - Open SCANPST.EXE.
- Select Browse and choose the .pst file.
- Optionally choose Options to turn the log off or append results to an existing log. By default a new log is created.
- Choose Start. The scan runs through its phases.
- If the scan finds errors, the tool offers Repair. The box labeled "Enter name of backup file" lets you rename the backup or choose Browse to change its location. By default the .bak copy is saved in the same folder as the original.
- Choose Repair and wait for the message that the repair is complete.
- Start Outlook with the profile that uses the repaired file.
Microsoft notes you may need to run the tool several times, because one pass does not always fix everything. If the scan reports no errors but Outlook still cannot open the file, the cause may be the Outlook profile or an add-in rather than the data file.
Run it from the command line for automatic extra passes
Starting in Outlook 2016 version 1807 (build 16.0.10325.20082), Microsoft says the tool can run multiple scans in a batch until it reaches a steady state. A steady state is reached when zero errors are returned, when two consecutive passes output the exact same result, or when the pass limit is reached. The limit is 20, and it defaults to 10 if not specified.
Any of -force, -silent, -rescan or -no repair turns on the new behavior. Microsoft documents these arguments:
| Argument | Meaning |
|---|---|
-file | Path to the .pst or .ost file to scan |
-rescan | Maximum number of scan or repair iterations, 0 to 20 (default 10) |
-log | Create a log; followed by append, replace or none (default replace) |
-backupfile | Create a backup with the file name that follows |
-no repair | Scan without repairing |
-force | Run without requiring UI choices (immediate mode) |
-silent | Show no UI; watch the log or the .bak file to know when it ends |
A command that scans a copy, logs the result and makes a backup could look like this (adjust the folder to where SCANPST.EXE is on your PC):
& "C:\Program Files (x86)\Microsoft Office\root\Office16\SCANPST.EXE" -file "D:\PST-Work\archive-copy.pst" -rescan 10 -log append -backupfile "D:\PST-Work\archive-copy-backup.bak" -forceUse -no repair first if you only want to see what the tool would report without changing the file.
After the repair: find what was recovered
Open Outlook and look at the folder list. Microsoft says a folder named Recovered Personal Folders may appear with your default folders, and it may be empty. The Lost and Found folder holds folders and items the tool could not put back in their original structure.
To clean up:
- Create a new Outlook Data File (.pst) from File > Account Settings > Account Settings > Data Files > Add.
- Drag the items you need from Lost and Found into the new data file, keeping your original folder layout where you can.
- When you are satisfied, remove the Recovered Personal Folders data file from the profile.
Pull more items from the backup file
Microsoft describes one more recovery trick that works only if you can still open the original file. Make a copy of the .bak file, rename the copy so it ends in .bak.pst, and import it using the Import and Export Wizard (File > Open & Export > Import/Export). Items that the repair removed may still exist in the backup.
If scanpst.exe will not start or the repair fails
| Symptom | Try this |
|---|---|
| SCANPST.EXE is missing from the Office folder | Search the disk for the file; if it is not on the PC, repair the Office installation from Settings > Apps |
| The tool will not start | Microsoft says to repair your Outlook program, then run the tool again |
| Errors remain after one run | Run it again, or use -rescan from a command prompt |
| Repair finishes but the file is almost empty | Import the renamed .bak.pst copy into a new PST |
| Outlook still will not open the PST | Create a new PST and import the old one with the Import and Export Wizard |
Creating a new PST and importing the data from the damaged one is an alternative to scanpst.exe that does not rely on the repair tool at all. If neither works, the file may be corrupted beyond repair. At that point restore from a backup, such as File History or a copy on another drive.
OST files and Exchange mailboxes
An .ost file is the offline copy of an Exchange or Microsoft 365 mailbox. It is not your only copy of the mail. Microsoft states that for an Exchange account you can delete the offline .ost file and Outlook recreates it the next time you open Outlook. Do that instead of repairing the OST, and only if the mail is safely stored on the server.
If you need to move a PST into a Microsoft 365 mailbox after repairing it, see PST import to Exchange Online by network upload.
How to avoid PST corruption
- Keep PST files on a local drive, not a network share or a cloud-sync folder that may lock the file while Outlook is open.
- Close Outlook before shutting down or unplugging an external drive that holds the PST.
- Avoid letting one PST grow without limit; split old mail into yearly archive files.
- Keep a copy of important archives on a second drive.
Checklist
- Outlook is closed and the PST is copied to a safe location.
- scanpst.exe was run against the file, with a log and a backup.
- Remaining errors were handled with another pass or
-rescan. - Items from Lost and Found are moved to a new PST.
- The Recovered Personal Folders file is removed once you have confirmed nothing is missing.
See also
- Power Automate: Send Email From a Shared Mailbox and Attach Files
- Outlook Autodiscover problems with Microsoft 365: DNS checks and fixes
- Stop Outlook asking for your password again and again in Microsoft 365
What we checked
- Opened Microsoft's "Repair Outlook Data Files (.pst and .ost)" page on support.microsoft.com on 2026-11-28 and followed its steps and labels: Browse, Options, Start, Repair, "Enter name of backup file", Recovered Personal Folders, Lost and Found.
- Confirmed on that page that the only listed scanpst.exe path is
C:\Program Files (x86)\Microsoft Office\root\Office16for Outlook 2019 and 2016, and that no path is listed for Microsoft 365, 2021 or 2024. - Opened the Microsoft Learn page "Inbox Repair tool (Scanpst.exe) run multiple passes" on 2026-11-28 and copied the argument table, the 0 to 20 range with a default of 10, and the steady-state rules from it.
- Cross-checked the default PST locations against Microsoft's "Introduction to Outlook Data Files" page on 2026-11-28.
- The sample command is built from the documented arguments; it was not run and we have no documented output for it.
- Not tested on a live Outlook profile or a damaged PST; steps follow Microsoft's documentation as of 2026-11-28.
Last tested: 2026-11-28
Comments
Questions and tips are welcome. Comments are checked by the EpiFive team before they appear; please do not share passwords, phone numbers or other private details.