How to Import PST Files into Office ‍365 with PowerShell? | Stellar (2023)

Summary: In this guide, you will learn how to use the PowerShell cmdlets to upload and import PST files into Microsoft 365. To quickly export single or multiple PST files from your local storage to Microsoft 365 directly, you can use Stellar Migrator for Outlook mentioned in this guide.

Contents

  • Why use PowerShell for PST to Microsoft 365 Migration?
  • Steps to Migrate PST to Microsoft 365 using PowerShell
  • Things to Consider for PST to Office 365 Migration with PowerShell
  • Alternative Method – Use Stellar Migrator for Outlook
  • Conclusion

Microsoft 365 (formerly Office 365) is a popular choice for organizations that want to move their emails and other mailbox data from Outlook to the cloud, as it offers benefits, including improved redundancy, reliability, security, and scalability at a reasonable cost. Microsoft 365 supports PST format. You can move or import PST files into Microsoft 365 using various methods. However, the preferred method, when it comes to migrating PST files to Microsoft 365, is by using the PowerShell commands.

Why use PowerShell for PST to Microsoft 365 Migration?

PowerShell is a powerful tool to perform various administrative tasks, including PST to Microsoft 365 migration. Here are some benefits of using PowerShell for PST to Microsoft 365 migration:

  • With PowerShell cmdlets, you can upload multiple PST files (20 GB or smaller) to the Microsoft Azure storage for import.
  • It saves time by automatically uploading all PST files to a single folder.
  • It’s scalable as it allows you to migrate large numbers of PST files to Microsoft 365.

Steps to Migrate PST to Microsoft 365 using PowerShell

Before you begin migrating or importing your PST files to Microsoft 365 with PowerShell, you need to prepare your system.

(Video) Import PST file into Office 365 mailbox (Using AZCopy)

Step 1: Prepare Your System Microsoft 365 Tenant

Follow the below instructions to prepare your system for PST import:

  • Download the Azure AzCopy tool on your system.
  • Ensure that you have sufficient administrative permissions to run the PowerShell commands with elevated privileges.
  • Configure your Microsoft 365 tenant and create mailboxes for the users to import the PST files.
  • Assign the Mailbox Import Export role in Microsoft 365.
How to Import PST Files into Office ‍365 with PowerShell? | Stellar (2)
  • Export the users’ mailboxes to PST format and then copy all the PST files that you need to import into Microsoft 365 in a separate folder with proper names.
  • Ensure the folder containing the PST file is accessible.

Step 2: Prepare PowerShell for PST Migration

To use PowerShell for PST migration, you need to,

  • Download the Azure AZCopy tool on your system.
  • Move the Azure AZCopy tool to the Desktop.

We will use the AzCopy tool via PowerShell to upload and import PST files from your local system into Microsoft 365.

Step 3: Create Mailbox Mapping File for PST Migration

Before you start migrating your PST files to Microsoft 365, you need to create a CSV mapping file to map the PST files to the user accounts in Microsoft 365. To create a mapping file, follow these steps:

  • Download this sample CSV template file or create a new CSV file containing the following columns: FilePath, Name, Mailbox, and TargetRootFolder details.
How to Import PST Files into Office ‍365 with PowerShell? | Stellar (3)
  • Open the CSV sheet in MS Excel or Google Sheets.
  • Replace the PST file name and the user account details in the CSV sheet to map the PST with users’ email accounts on Microsoft 365 along with other required details.

Tip: Avoid using spaces, uppercase letters, or special characters while preparing the PST files for the import job.

Once you have populated the details, save the CSV file and follow the next step to create a PST import job.

Step 4: Create a PST Import Job and Import PST Files into Microsoft 365

To create a PST import job in Microsoft 365, follow these steps:

  • Open and log in to Microsoft 365 as a global administrator.
  • Go to Data lifecycle management > Microsoft 365.
  • Click on the ‘Import’ tab.
  • Choose ‘New Import Job’. This will start a new Import Job wizard.
How to Import PST Files into Office ‍365 with PowerShell? | Stellar (4)
  • Name the import job and select Upload your data.
  • Click ‘Show network upload SAS URL’ and click Copy to clipboard button to copy this SAS URL into your Notepad. This SAS URL is critical to upload the PST file to Azure cloud storage. So, keep it safe and secure.
How to Import PST Files into Office ‍365 with PowerShell? | Stellar (5)
  • Click Download Azure AzCopy to download and install the Microsoft Azure Storage tool. The AzCopy tool helps to quickly upload PST files (20 GB or smaller size) to Microsoft 365.
  • Once the installation is complete, open PowerShell on your local computer. Navigate to Desktop where you have stored the Azure AzCopy tool and run the following PowerShell command to upload the PST files:

azcopy.exe copy “PSTFolder or Location of pst files” “sas url=”>”

(Video) Import PST to Office 365 Manually - Upload PST to Office 365 Mailbox

How to Import PST Files into Office ‍365 with PowerShell? | Stellar (6)
  • Once the PST upload operation is complete, go back to Microsoft Office 365 import process and select ‘I’m done uploading my files’ and ‘I have access to the mapping file.
  • Click ‘Next.’
  • On the next screen, you need to upload and validate your CSV mapping file.
How to Import PST Files into Office ‍365 with PowerShell? | Stellar (7)

Once you’re done, you can start the PST import wizard to successfully import the PST file into Microsoft 365. After the import, users can log in to Microsoft 365 (Outlook 365) to access all their emails, contacts, attachments, and other mail items.

Things to Consider for PST to Office 365 Migration with PowerShell

During the upload or import process, you may experience issues that may prevent you from importing the PST files. To avoid issues, ensure the following:

  • Make sure that you have all the necessary permissions and roles required to perform the migration.
  • If you have decided to migrate PST to Microsoft 365 via your system, make sure that your network is configured correctly and working as intended. Also, ensure you have enough bandwidth available from your internet service provider.
  • Make sure that your PST files are consistent and have no errors or bad/corrupt items. For this, you can scan each PST file with SCANPST.exe, which will fix the bad items/corruption or inconsistencies and prevent issues during the PST import process.

Alternative Method – Use Stellar Migrator for Outlook

Stellar Migrator for Outlook is an advanced Outlook PST to Microsoft 365 migrator tool that aims to help individuals, IT admins, and businesses easily migrate users’ mailboxes stored in PST format to Microsoft 365.

By using Stellar Migrator for Outlook, you can automate the PST to Microsoft 365 migration and significantly save time, effort, and cost required for the mailbox migration.

The software offers an intuitive user interface, making it perfect for users with little to no expertise who want to import single or multiple PST files into Microsoft 365 (Office 365).

It also offers some advanced features, such as:

  • Imports large or oversized PST files into Microsoft 365 (~50 GB or more)
  • Uses secure Microsoft Modern Authentication for connectivity and PST to Microsoft 365 migration
  • Allows you to select desired mail folders and items
  • Helps conserve mailbox storage on Microsoft 365
  • Previews all the mail items
  • Maintains the original folder structure and hierarchy during the conversion and upload process
  • Comes with cloud-based licensing and pay-per-mailbox plan (1-999 PSTs or more)
  • Supports Outlook 2007, 2010, 2013, 2016, 2019 and 2021

Stellar Migrator for Outlook is also quite easy-to-use. All you need to do is follow these simple steps:

Step 1: Select the PST file you want to import into Microsoft 365 and start the scan.

(Video) How to download PST from the Microsoft admin portal using Office 365 eDIscovery 2022

How to Import PST Files into Office ‍365 with PowerShell? | Stellar (8)

Step 2: After the scan, preview and select the mail items and folders you want to import into Microsoft 365.

How to Import PST Files into Office ‍365 with PowerShell? | Stellar (9)

Step 3: Log in to the software using your Stellar® cloud credentials.

How to Import PST Files into Office ‍365 with PowerShell? | Stellar (10)

Step 4: Select the Microsoft 365 profile configured in your Outlook to start the import process.

How to Import PST Files into Office ‍365 with PowerShell? | Stellar (11)

Step 5: The migration from PST to Office 365 process is completed.

How to Import PST Files into Office ‍365 with PowerShell? | Stellar (12)

As soon as you enter the Microsoft 365 details, the software starts importing the selected PST items into the user account directly.

Conclusion

This guide discusses how to use the PowerShell commands to import PST files into Microsoft 365. However, migrating the mailboxes from PST files to Microsoft 365 is a complex and time-consuming task. If you need to import several PST files without the risk of data loss, corruption, etc., it is recommended to download and install the Stellar Migrator for Outlook software. The software is not susceptible to errors and imports all mail items from PST to your Microsoft 365 mailbox with complete integrity while maintaining the original folder structure.

About The Author

How to Import PST Files into Office ‍365 with PowerShell? | Stellar (13)

Shelly Bhardwaj

I am a Product Consultant and is associated with Stellar Data Recovery from last 8 years. I write about the latest technology tips and provide custom solutions related to Exchange Server, Office 365, MS Outlook, and many other Email Clients & different flavors of OS Servers. Read More

(Video) How to import your organization PST files to Office 365 Using network upload
(Video) How to Import Archive Email | Pst Files to Microsoft 365 Outlook | Outlook 2019 | Outlook 2021

FAQs

How do I import a PST file into Outlook 365 using PowerShell? ›

5 Quick Steps to Import PST to Office 365 Online Archive Mailboxes
  1. Download and Install the tool.
  2. Enter Credentials of Office 365 Account.
  3. Click on Add File(s)/ Folder Option to Import PST file.
  4. Apply the Filter option to import selective PST file data.
  5. Click on the Import button to begin the process.
Mar 20, 2023

What is the best way to import PST into Office 365? ›

There are two ways you can import PST files to Microsoft 365: Network upload: Upload the PST files over the network to a temporary Azure Storage location in the Microsoft cloud. Then you use the Microsoft 365 Import service to import the PST data to mailboxes in your organization.

How do I import a PST file into Office 365 public folder? ›

Select all items from the . PST file (simultaneously hold CTRL and A), drag and drop them to the Public Folder. You may also copy and paste them if you like.

How do I export mailbox to PST in Office 365 PowerShell? ›

How to Export Office 365 Mailbox to PST Using PowerShell Command?
  1. Step 1: Launch the Connection using MS Exchange Server using PowerShell. ...
  2. Step 3: Launch Outlook Profile for New Account. ...
  3. Step 4: Check MS Outlook Configuration Settings. ...
  4. Step 5: Transfer Mailbox to PST Using Import/Export Wizard.
Sep 2, 2022

How to upload files to SharePoint Office 365 using PowerShell? ›

Here is how to upload files to SharePoint Online:
  1. Load SharePoint CSOM Assemblies. ...
  2. Variables for Processing. ...
  3. Setup Credentials to connect. ...
  4. Set up the context. ...
  5. Get the Library. ...
  6. Get the file from disk. ...
  7. Get File Name from source file path. ...
  8. sharepoint online upload file powershell.
Jul 18, 2022

Does Outlook 365 support PST files? ›

The short answer to this is: Yes, Office 365 does support PST files.

How to use Outlook policy to control PST use and creation in the Office 365 Import Service? ›

To do this, follow these steps:
  1. Open Registry Editor.
  2. Locate and select the following registry subkey. ...
  3. On the Edit menu, point to New, and then select DWORD Value.
  4. Type PSTDisableGrow , and then press Enter.
  5. Right-click the PSTDisableGrow registry entry that you created, and then select Modify.
May 18, 2023

How do I import PST files into Outlook Exchange? ›

Create mailbox import requests
  1. In the EAC, go to Recipients > Mailboxes > click More options. , and select Import PST.
  2. The Import from a . pst wizard opens. ...
  3. On the next page, select the target mailbox, and then select one of these options: Import to this mailbox. ...
  4. On the last page, configure one of these settings:
Feb 21, 2023

How to convert PST to OST in Office 365? ›

How do I convert my Outlook PST files to OST?
  1. Open Microsoft Outlook.
  2. Enter File.
  3. Click Import and Export.
  4. Select Import from another program or file.
  5. Click Next.
  6. Choose Personal Folder File (.pst)
  7. Click Next.
  8. Select the PST file from the system.
Dec 11, 2019

How to convert shared mailbox to user mailbox Office 365 PowerShell? ›

Convert shared to user mailbox with PowerShell
  1. Install Exchange Online PowerShell module.
  2. Connect to Exchange Online PowerShell. ...
  3. Convert shared mailbox to user mailbox using the Set-Mailbox cmdlet. ...
  4. Run the Get-Mailbox cmdlet to verify that it converted the shared mailbox to a regular user mailbox.
Apr 7, 2023

How to create shared mailbox in Office 365 using PowerShell? ›

How to create a shared mailbox with PowerShell
  1. Step 1: Connect to exchange online. Refer to the article connect exchange online powershell for step-by-step instructions.
  2. Step 2: Run the cmdlet New-Mailbox. To create the Shared Mailbox, we are going to use the cmdlet New-Mailbox. ...
  3. Step 3: Modify Shared Mailbox permissions.
Dec 5, 2022

How do I give mailbox permissions in Office 365 PowerShell? ›

1. Assign Mailbox Permissions
  1. 1.1 – Assign “Full Access” permissions for a Mailbox. ...
  2. 1.2 – Assign “Send As” Permissions for a Mailbox. ...
  3. 1.3 – Assign “Send As” Permissions for a ALL Mailbox's (BulkMode) ...
  4. 1.4 – Assign “Send As” Permissions for recipient for each member in a distribution group.
Feb 20, 2023

How do I upload files to SharePoint using PowerShell? ›

Navigate to your SharePoint Online library >> Click on “Upload” from the toolbar and choose the “Folder” option. Browse and select a folder from your computer. You can also upload a folder with files and sub-folders just by dragging and dropping! PowerShell can also be used to upload a folder to SharePoint Online.

How to import upload an entire folder of files to SharePoint using PowerShell? ›

Navigate to your SharePoint Online library >> Click on “Upload” from the toolbar, and choose the “Folder” option. You'll get a Browse dialog box to select a folder from your computer. Select a folder to copy that entire folder to the SharePoint Online library.

How do I import Outlook to o365? ›

Choose File > Open & Export > Import/Export. In the Import and Export Wizard, choose Import from another program or file, and then choose Next.

How do I enable PST files in Outlook 365 registry? ›

To do this, follow these steps:
  1. Open Registry Editor.
  2. Locate and select the following registry subkey. ...
  3. On the Edit menu, point to New, and then select DWORD Value.
  4. Type PSTDisableGrow , and then press Enter.
  5. Right-click the PSTDisableGrow registry entry that you created, and then select Modify.
May 18, 2023

Can I import a pst file into Outlook com? ›

To import a PST file to Outlook, you have two options: Use the “Open Outlook Data File” or the “Import/Export” options in the Outlook “File” > “Open and Export” menu. With the first option you import the complete PST file to Outlook and it will be displayed in the folder bar as “Outlook Data File”.

Videos

1. Microsoft 365/Exchange - How to export emails in a PST format from the 365 portal
(Quick Tech Training)
2. PST Migration in Office 365
(CloudAndYou)
3. Batch Import Multiple PST files into Office 365 Webmail without Outlook
(RecoveryTools)
4. Microsoft 365 - How to connect to Powershell Exchange Online
(Quick Tech Training)
5. Office 365 Import OST file to Pst ? Simple step.
(Technical Techo)
6. How to Connect to Security and Compliance PowerShell Microsoft 365
(BonGuides)

References

Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated: 15/11/2023

Views: 6254

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.