Is it true that I can't import / ingest PST files into 365 with PowerShell

I spent the last couple of hours searching the internet for how to import PST Files with powershell.
But I wasn’t able to find anything helpful. Looks like the only way is to use network upload to import PST files to Office 365.

Just wondering … If this is correct and the only way to upload pst files is to use the GUI? Why not PowerShell ?

hi, there are no API to instrument the import phase after the pst are uploaded in the Azure blob.
There are API for SharePoint to import the data packages, but this is another ingestion model.

With pst import, you can instrument the:

  • pst export from Exchange server (yes there are scenario where this could be the best solution rather than use migration)
  • create the import csv based on the exported pst
  • trigger the Azcopy ingestion

but after that, you need to use the portal to create the import job and go through the csv validation.


But why not PowerShell ?? O365 is a Microsoft product and PowerShell is a MS product ?? it’s not like a third party product

I do believe, that is due to the nature of the way the import works.
First the MailboxImportRequest is not exposed to Exchange Online Pshell, and this could be related to the impact it may have the Throttling polices (my assumption)
Second it relay on an Azure blob storage, so it require a different server side instrumentation.

At the moment, I haven`t see so many request to automate the process, probably due to the fact that the very last part is the most critical one (create the correct csv file to import the right pst in the right mailbox, also considering that users may have different requirements on where the ingested data will need to land in the mailbox)

anyway, I will check and let you know :slight_smile:
What is the scenario that will require you a full automation of the process?

We’re testing something.
So we’re generating a 1000 email/weekly/user, converting them to PST, then uploading them to the cloud.
I’d like to automate the process instead of doing this manually every week.

Hi Del,
I believe the only part that you cannot do natively in PowerShell at the moment is upload the PST’s to the azure blob storage.
It can be done via the AzCopy utility however, which can obviously be called through PowerShell.
You might want to check out this blog post.


Thanks Liam