Converting OST to PST for all users at once using Powershell script?

This thread has been locked for new comments by a moderator, if you have a new similar issue then please start a new thread.
Occasional Contributor



is it possible to convert OST to PST for all users at once using Powershell script?


and upload to o365?



11 Replies

Yota OST to PST Converter is a user-friendly software that helps to migrate the entire data without any hassle. It is known as one of the best OST to PST conversion tool because it allows users to import OST to PST and other useful formats with complete accuracy. This utility doesn't require any technical knowledge for its use. The software has an interactive interface that guides the users through each and every step of migration process with detail description. Users can easily recover attachments, emails, tasks, contacts, calendar entries, notes etc. from the files using this tool.

OST is just a cache file that only helps you access your Outlook Profile Offline. Sometimes due to many reasons, if the OST file has corrupted, then you can delete the OST file from the local folder and can recreate the OST file from the network server. However, When the user profile has been deleted from the Network server and users don’t have the mailbox backup, they can use the local saved OST file to regain their mailbox data in the PST file format. That PST you can import to new Outlook profile without any hassle. Unfortunately, there are no free tools or PowerShell commands to convert the encrypted orphaned OST file. You have to go with 3rd party tools for this work. You can check the MVP discussion and take the idea about the some recommended OST converter tool available in the market,

You can convert offline IMAP, Outlook, or Exchange OST files to PST format using this utility without any additional work. The software offers a user-friendly interface that allows even non-technical users to convert OST files to PST files. You can convert 50 items from an OST file to PST format during the free trial time.
OST to PST Converter is a powerful OST to PST conversion tool that restores data from OST files. The software includes a slew of user-friendly features to enable a speedy and seamless conversion from OST to PST.

best response confirmed by Linkang (Occasional Contributor)
Hii, You can convert your OST files to PST by using these simple steps:-
1. Download Microsoft Outlook and go to the File menu.
2. Choose the Import/Export option.
3. Then, select the Export to a file option to export the desired file.
4. Select Outlook Data File (.pst)
5. Choose whether to export a specific folder or the whole account.
6. Check the Include subfolders box and add the subfolder if you want to add it.
7. Next, select a destination for the Export, and then click Finish

Hi, @Linkang If the need to convert Outlook OST file to PST format arises, There are no PowerShell commands that can read OST files or convert OST to PST, the problem is that Microsoft never really exposed OST file format in .NET classes, which means PowerShell's got nothing to build on but there are some manual methods and third-party tools you could potentially use. One such trustworthy tool is Shoviv OST to PST file Converter.

So, as far as converting OST to PST using PowerShell is concerned, it isn’t feasible as of now.


Convert OST to PST file Manually:-


  • Open MS Outlook.
  • Click the File menu.
  • Select the “Import and Export” wizard or press ‘t’.
  • From the list, click the “Export to a file” option and then click Next button
  • Select Personal File Folder (.pst) and then click Next button.
  • Select the items to be exported or Click on parent root and check the Include sub-folders option.
  • Browse and select the target folder for saving the email items.
  • Click the Finish button.


In Outlook 2013, 2016, or 2019,

  • Navigate to File > Open & Export > Import/Export. This opens the Outlook Import Export Wizard.
  • Select Export to a file from the Import and Export Wizard window and click Next.
  • In Export to a file window, choose Outlook Data File (.pst) and click Next.
  • Choose the mail folders and items you want to convert to PST and check the 'Include subfolders' checkbox. Then click Next.
  • Click 'Browse' to select a save location to save the converted PST file and click 'Next.
  • Click 'Finish. Then enter a password or click 'OK' without entering the password.'



We'll need to use Outlook self to manually convert an OST file to a PST. Ensure that you can access the original Outlook profile.

  • Click File in Outlook.
  • Choose Import/Export from the list of options under Open & Export.
  • Choose Save as a file from the drop-down menu.
  • Choose a data file from Outlook (.pst)
  • Choose whether to export a specific folder or the entire account. Ascertain that Include subfolders is checked.
  • Click Next, then Finish after selecting an export destination. When the export is complete, you'll be given a PST file that you may use to import your emails into another account.




Stellar Converter for OST is extremely helpful tool.

@Linkang As a reminder to all respondents, we do not allow external third-party links in Tech Community. We'll be removing posts that include these links, or will remove links within posts, depending on the content. The question was about using a PowerShell script - if you must suggest a third-party tool, please do not link to it as self-promotion/advertising is against our code of conduct. Thanks for understanding and contributing to Tech Community.

Hi @Linkang


I am not sure that you are capable of converting OST files to PST format by using Powell script or not. As I belongs to a non-technical background, so I don't know much about this. I can only confirm you about these file format of OST and PST.


So, let me share you my thoughts. Once your Outlook gets disconnected than there is a OST file in background which contains all the data of your Outlook. When you are trying to connect back to Outlook, then you'll get an error. In that case, you can only import PST file to Outlook which is only a single option in Outlook. There is a need of converting your OST files into PST format.


Now, the question is can I convert those OST files into PST by using Powershell script or not. I don't confirm you about it. But I can share you some third-party tools which helps you! I usually preferred to ZOOK OST to PST Converter for my cases when I got these issues of ost and pst. This tool is so helpful in resolving these issues. You can also opt to use this and hopefully this will help you too!





Thanks and Regards

Steve Smith

Hello all! We've turned off the ability to reply to this thread, as the author's question has had many answers, and this question is spawning a lot of advertisements for third-party products in response, which is prohibited by our guidelines. Thanks!