Depending on which Outlook for Windows client you use, the backup options may vary. Classic Outlook supports local PST/OST files and COM-based automation, while New Outlook for Windows uses a different architecture and does not support COM/VSTO add-ins or Outlook Object Model automation. New Outlook also has its own PST export capabilities.
Our article focuses primarily on Classic Outlook and local PST backups. For Exchange Online and Microsoft 365 mailboxes, you should generally handle enterprise backup using Microsoft 365 data-protection and retention features or a dedicated Microsoft 365 backup solution rather than by copying local Outlook cache files.
For POP3 accounts and additional local PST files, mailbox data may be stored in PST files on the local machine. Exchange and IMAP accounts may use local OST files as a cache of mailbox data, but you should not treat an OST file as a portable backup of the mailbox.
Backup Outlook PST Data Files Using OutlookBackupAddin
Important. OutlookBackupAddin is intended for Classic Outlook for Windows. It is a COM-based add-in and is not supported by New Outlook for Windows. If you use New Outlook, you should follow the PST export options provided by Microsoft instead.
For earlier versions of Outlook (2007 and 2003), there was an official tool called the Outlook Add-in: Personal Folders Backup (pfbackup.exe), which could be used to back up Outlook data files. But this add-in is unavailable for recent Outlook versions.
One third-party option for Classic Outlook is the open-source OutlookBackupAddin project. However, the project currently lists Outlook 2013, 2016, and 2019 as supported versions, so you should verify compatibility with newer Classic Outlook versions before deployment.
- Download OutlookBackupAddIn.zip from the project page on GitHub.
- Extract the archive and run OutlookBackupAddIn.msi to install the add-in.

- Restart Outlook and go to the Backup tab on the ribbon bar.
- Click Settings and configure the following options:
Outlook Files: select which PST files you want to back up automatically.
Interval: select backup frequency (default is once a day).
Destination: specify where to save the backup.
When you exit Outlook, the BackupExecutor.exe tool will automatically back up the selected PST files.

Note. The backup is performed by the tool “C:\Program Files (x86)\CodePlex\outlookbackupaddin\BackupExecutor.exe”.
How to keep multiple versions of backups
By default, new backup overwrites the previous one. If you want to keep multiple versions of backups, use the keep_n_backups.bat script included into the distro. This script should be run using the Post-backup cmd option in the backup settings.

By default, this add-in only detects and backs up .PST files. If Outlook connected to a mailbox using MAPI (Exchange protocol) or IMAP, emails are stored on the mail server rather than on your computer. In this case, only cached e-mail messages are available on local computer in the OST file (instead of the PST file).
Backing Up OST Files in Classic Outlook
Keep in mind that an OST file is a local cache of mailbox data, not a portable backup file. For Exchange, Microsoft 365, or IMAP accounts, copying an OST file is generally not a substitute for backing up the mailbox data. An OST file is tied to the Outlook profile and account and cannot normally be restored by simply copying it to another computer.
OutlookBackupAddIn also allows to backup OST files. This requires the creation of the ShowOSTFiles registry parameter:
reg add HKCU\SOFTWARE\CodePlex\BackupAddIn\Settings /v ShowOSTFiles /f /t REG_SZ /d True
After that, the mail profile OST file will be available for adding to backup settings.

If you want to use OutlookBackupAddIn to automatically back up Outlook files on multiple computers in your organization, the developers recommend using ADMX GPO templates to centrally configure backup settings.
Copy the ADMX folder from the distribution archive to %systemroot%\PolicyDefinitions, and then you can manage the OutlookBackupAddIn settings using the Group Policy Editor (User Configuration\Policies\Administrative Templates\Outlookbackup addin settings)

Note. Unlike PST, this OST backup can’t be used on another computer or in another environment. It can only be restored to the source computer with the same mail account and user profile.
Backup Outlook Data in New Outlook
Note that New Outlook for Windows uses a different architecture from Classic Outlook and does not support COM/VSTO add-ins/Outlook Object Model automation. However, New Outlook supports exporting mailbox data to PST. Microsoft has also added options for recurring PST exports in New Outlook.
Keep in mind that PST functionality in New Outlook is still more limited than in Classic Outlook. For example, some traditional PST import and calendar/contacts cases are not supported. If you need the full traditional PST workflow, you should use Classic Outlook.
To export mailbox data in New Outlook, go toย Settings > Files > Exportย and follow the export wizard. Note that the available PST features and export options may differ from Classic Outlook and continue to evolve.
What About Exchange Online and Microsoft 365?
If the mailbox is hosted in Exchange Online/Microsoft 365, you should not treat copying a local PST/OST file as the primary enterprise backup strategy.
For organizational mailboxes, you should consider Microsoft 365 retention and compliance features, eDiscovery/export capabilities, and dedicated Microsoft 365 backup solutions when independent backup and recovery are required.
Local PST backups can still be useful for specific user-level or migration scenarios, but they should not replace an organization-wide backup strategy.
Backup Outlook PST Files Using PowerShell
Note that the following PowerShell method applies to Classic Outlook for Windows. It uses the Outlook Object Model through COM automation, which is not supported by New Outlook for Windows.
Important. The PowerShell method mentioned below is intended for user-interactive backup cases. Keep in mind that Microsoft does not support Outlook Object Model automation from unattended apps (including Windows services and non-interactive scheduled tasks).
To automatically back up Outlook PST files, you can use the PowerShell scripts. An example of such a PowerShell script is shown below (the script is divided into several sections with descriptions).
Specify the path to the directory where you want to save the Outlook backup files:
$TargetFolder= "D:\backup\Outlook"
# Create the backup folder if it doesn't exist
if (-not (Test-Path -Path $TargetFolder)) {
New-Item -Path $TargetFolder -ItemType Directory | Out-Null
}
Connect to the running Classic Outlook instance:
try {
$outlook = [Runtime.InteropServices.Marshal]::GetActiveObject("Outlook.Application")
}
catch {
Write-Warning "Classic Outlook is not running. Start Outlook and run the backup again."
exit 1
} List connected PST files in the current Outlook configuration:
$namespace = $outlook.GetNamespace("MAPI")
$pstPaths = foreach ($store in $namespace.Stores) {
if ($store.FilePath -and $store.FilePath -like "*.pst") {
$store.FilePath
}
}
$uniquePstPaths = $pstPaths | Sort-Object -Unique
$uniquePstPaths
# Clean up COM objects
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($namespace) | Out-Null
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($outlook) | Out-Null
Remove-Variable namespace, outlook
[GC]::Collect()
[GC]::WaitForPendingFinalizers() 
Before copying PST files, you need to close Classic Outlook to ensure that the files are no longer in use. The following script does not close Outlook automatically because doing so could interrupt a user’s active Outlook session and cause unsaved changes to be lost:
Write-Host "Close Classic Outlook before continuing."
Read-Host "Press Enter after Outlook has been closed"
if (Get-Process OUTLOOK -ErrorAction SilentlyContinue) {
Write-Error "Outlook is still running. Close Classic Outlook before starting the backup."
exit 1
}
In order to avoid copying unchanged PST files, you can compare the source and destination files before performing the backup. While comparing file size is a simple approach, checking the file’s LastWriteTime is generally more reliable because a PST file can be modified without its size changing. The following example copies the file only if the source PST is newer than the existing backup:
foreach ($pstPath in $uniquePstPaths) {
$pstFile = Get-Item -Path $pstPath
$targetPstPath = Join-Path -Path $TargetFolder -ChildPath $pstFile.Name
$targetFile = Get-Item -Path $targetPstPath -ErrorAction SilentlyContinue
if (-not $targetFile -or $pstFile.LastWriteTime -gt $targetFile.LastWriteTime) {
Copy-Item -Path $pstFile.FullName -Destination $targetPstPath -Force
}
} In case multiple PST files have the same filename, using only the filename as the destination can cause one backup to overwrite another.
The script mentioned above requires an interactive user session with Classic Outlook available. You need to close Outlook before the PST copy operation starts. Do not run Outlook COM automation under SYSTEM, a service account, or another non-interactive session! For fully automated unattended backups, you should use a backup solution that does not depend on Outlook desktop COM automation.
Handling backup errors
When automating Outlook backups, you should handle common errors (such as missing PST files, access denied errors, or failed copy operations). One simple method is to wrap the copy operation in a try { } catch { } block:
foreach ($pstPath in $uniquePstPaths) {
try {
$pstFile = Get-Item -Path $pstPath -ErrorAction Stop
$targetPstPath = Join-Path -Path $TargetFolder -ChildPath $pstFile.Name
Copy-Item -Path $pstFile.FullName -Destination $targetPstPath -Force -ErrorAction Stop
Write-Host "Backed up $($pstFile.Name)"
}
catch {
Write-Warning "Failed to back up $pstPath. $($_.Exception.Message)"
}
} For production environments, you should consider writing errors to a log file or the Windows Event Log instead of displaying them on the console.
Before starting a backup, you should consider verifying that the destination drive has enough free disk space, especially when working with large PST files.
Security recommendations
Outlook PST files often contain sensitive emails, attachments, and personal information. When storing backup copies, you should protect them from unauthorized access. Some recommended practices include:
- storing backups on NTFS volumes with restricted permissions;
- saving backup files to encrypted drives (such as BitLocker-protected volumes);
- using encrypted archives (for example, 7-Zip with AES-256 encryption) before copying backups to external storage or cloud services;
- limiting access to backup folders to authorized users only.
If you’re backing up Outlook data in a corporate environment, you should follow your organization’s data protection and retention policies.
Where to store Outlook backups
Although this example saves PST backups to a local drive, you should consider storing backup copies on a network share, NAS device, or cloud-synchronized folder for better protection against hardware failures or data loss. For example, you can set the destination folder to a UNC path:
$TargetFolder = "\\FileServer\OutlookBackups"
If you’re backing up Outlook data in an enterprise environment, make sure the backup location is regularly backed up and accessible only to authorized users.
For large PST files or enterprise backup cases, you may also consider using Robocopy instead of Copy-Item because it provides retry logic, logging, and more resilient file copy operations.
Wrapping Up
For Classic Outlook, PST backups can be automated using OutlookBackupAddIn/PowerShell. New Outlook for Windows has its own PST export capabilities and does not support COM-based automation used by the PowerShell method in our article.
For Exchange Online and Microsoft 365 environments, you should not consider local PST/OST copies as a replacement for an organization-wide backup and retention strategy.
The add-in provides a simple GUI-based solution for individual users, while PowerShell offers greater flexibility for administrators by supporting scheduled tasks, centralized storage, custom error handling, and integration with enterprise backup workflows.
Does Outlook have a built-in feature to automatically back up emails?
No. Modern versions of Outlook do not include a built-in feature for automatically backing up mailbox data. To automate PST backups, you must use a third-party tool such as OutlookBackupAddIn or create a PowerShell script.
Which Outlook mailboxes can be backed up using PST files?
Automatic PST backups are primarily relevant for POP3 accounts and any additional PST files attached to an Outlook profile. Exchange and IMAP accounts store mailbox data on the mail server and use OST cache files locally instead of PST files.
Can I back up OST files?
Yes. OutlookBackupAddIn can back up OST files after enabling the ShowOSTFiles registry setting. However, an OST backup can generally only be restored on the original computer with the same Outlook profile and mail account.
Can I keep multiple versions of my Outlook backups?
Yes. OutlookBackupAddIn includes the keep_n_backups.bat script, which can be configured as a post-backup action to retain multiple backup versions instead of overwriting the previous backup.
How can I automate Outlook PST backups with PowerShell?
A PowerShell script can:
- detect all PST files attached to the current Outlook profile;
- close Outlook gracefully to release file locks;
- copy PST files to a backup location;
- skip unchanged files by comparing modification timestamps;
- be scheduled with Task Scheduler for automatic execution.


