Import PST to Exchange Online using PowerShell (New-MailboxImportRequest)

Copper Contributor

Hi all!! I'm trying import a PST file to Office 365 using the cmdlet New-MailboxImportRequest.

 

Note: I already imported the file to Azure Blob Storage with AZCOPY (the storage was created by compliance center - ingestiondata).

 

The complete command of New-MailboxImportRequest is:

 

New-MailboxImportRequest -Name "pilotps" -IsArchive -Mailbox [user @ domain.com] -AzureBlobStorageAccountUri "https://example.blob.core.windows.net/ingestiondata/user/user_1.pst" -AzureSharedAccessSignatureToken "[SAS KEY]" -TargetRootFolder "/" -BadItemLimit 20 -LargeItemLimit 20

 

When I use GUI (wizard though browser) works fine but with powershell cmdlet New-MailboxImportRequest I get the error:

 

Unable to open PST file 'https://example.blob.core.windows.net/ingestiondata/user/user_1.pst'.

Error details: The remote server returned an error: (404) Not Found.

 

In this official doc the cmdlet can be used to Exchange Online (although there are not a single example): https://docs.microsoft.com/pt-br/powershell/module/exchange/new-mailboximportrequest?view=exchange-p...

 

I read on this blog: https://blogs.perficient.com/2016/08/15/office-365-how-to-import-psts-from-azure-storage-via-powersh...

 

That use the cmdlet is not supported in default Azure Storage (created by compliance center) and to work with PowerShell I need create my own Blob Storage but I would not want this:

 

The mention of blog: "While Microsoft provides Azure Blob Storage with the PST Import Service, it appears that the SAS token that they provide only allows read and list access to the folder. You can upload PSTs to the folder using the token but you cannot download or read them. In order to use PowerShell for our imports, we’ll need to provision our own Azure Blob Storage with a SAS token that can read the uploaded files."

 

Someone know about this limitation? There is some official documentation? Thanks in advance!!

0 Replies