Import data to Office 365

This is a step by step guide on how to use the SharePoint Online Migration PowerShell cmdlets to migrate content from an on-premises fileshare or an on-premises SharePoint Server site to Office O365.

If you have to migrate a large amount of data, and uploading it over the network is prohibitively expensive or not feasible, you can use the “drive shipping” service.

You can determine if your data is small or large based on your network upload performance numbers (bandwidth, latency). Typically, if you have more than 10 TB of data, drive shipping is faster.


Creating a package from an on-premises SharePoint Server site

To create a content package from an on-premises SharePoint Server site, the first step is to use the Export-SPweb cmdlet. This cmdlet exports a site, list or library from SharePoint Server.

  • Identity: Specifies the URL or GUID of the Web to be exported.
  • Path: Specifies the name of the export file. Because we require that the NoFileCompression parameter is used, a directory must be specified
  • NoFileCompression: Either enables or disables file compression in the export package. File compression must be disabled.
  • ItemUrl: Specifies the URL of the Web application, GUID, or object to be exported.
# Create new package from an on-premises SharePoint Server site

Export-SPWeb [-Identity] <SPWebPipeBind> -Path <String> [-ItemUrl <String>] [-NoFileCompression <SwitchParameter>]

Type the following command in the SharePoint Management PowerShell window:

ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath D:\contoso\data -SourcePackagePath D:\contoso\package -OutputPackagePath D:\contoso\targetedPackage -TargetWebUrl -TargetDocumentLibraryPath "Shared Documents"

This command validates that the source package’s contents still matches the source files. The command then connects to the server in order to validate the site collection and the document library you are importing the file share in to (i.e. “Shared Documents”). The new targeted package will be placed at D:\contoso\targetedPackage.

After the package is created, it describes the files in their current state on the local machine or file share. The package must now be retargeted to SharePoint Online so it can be imported.

  1. Using the Azure key and URL displayed in the “Upload files over the network” window , type the following command in the SharePoint Management PowerShell window:
    Set-SPOMigrationPackageAzureSource -SourceFilesPath D:\contoso\data -SourcePackagePath D:\contoso\targetedPackage -AccountName myaccountName -AccountKey 000000000000000000== -FileContainerName files -PackageContainerName package
  2. Make a note of the container names, as you will reference them in the mapping file step.
    The account name is value in the URL between the http:// and
  1. In the “Upload files over the network” window, select I’m done uploading my files and I have access to the mapping file. Click Next.
  2. Enter a name of your choice for the job. Click Next.
  3. Choose the Plus symbol (+) and browse to locate your CSV file.
  4. Check the box to agree with the terms and conditions.
  5. Click Finish. Your job has been submitted and will be picked up momentarily by SharePoint Online.
    The CSV file contains the mapping information that describes the imports you want associated with a given job (e.g. you can collate multiple imports together if they are related).

    Create a new CSV in Excel similar to this table:

    Workload File path Name Mailbox IsArchive TargetRootFolder SPFileContainer SPManifestContainer SPSiteUrl
    SharePoint files package

The container and manifest should match the values specified when you uploaded the package to Azure. The SP Site URL should also match the SharePoint Online site you are targeting.

Shipping drives to Office 365 is a nine part process:

You can manage all your import jobs and get additional tenant specific account information on the IMPORT page:

Office 365 admin center Import page.

If you choose to ship your drives, you need:

  • Hard drives and adaptors: Only 3.5 inch SATA II/III hard drives are supported by the PST Import service. Hard drives larger than 6 TB are not supported. For import jobs, only the first data volume on the drive will be processed. The data volume must be formatted with NTFS. You can attach a SATA II/III disk externally to most computers using a SATA II/III USB Adapter.
    The following drives and adaptors have been used during testing. This is for reference, not an endorsement:

    • “WD Green 1TB, 2TB, 6TB Desktop Hard Drive: 3.5-inch, SATA 6 Gb/s, IntelliPower, 64MB Cache WD10EZRX, WD20EZRX, WD40EZRX”The 1,2 and 4 TB drives were used during testing.
    • “ eSATA USB to SATA Hard Drive Docking Station for Dual 2.5 or 3.5in HDD”Use this to connect the drive above to the computer that you are using to run the Azure Import/Export drive preparation tool.
  • BitLocker encryption: All data stored on hard drives must be encrypted using BitLocker with encryption keys protected with numerical passwords. The Office 365 drive preparation tool will help with the encryption.
  • A carrier account with FedEx or DHL. See Shipping for more information.


You can prepare your drives with the Microsoft Azure Import/Export Tool. For more details about using the Microsoft Azure Import/Export Tool, see Microsoft Azure Import/Export Tool Reference. You can download the Microsoft Azure Import/Export Tool as a standalone package.

Download and install the SharePoint Online Management Shell . This installer contains the Windows PowerShell environment for managing SharePoint Online.

Once installed, open the SharePoint Online Management Shell from the start menu.

  1. Run the following to connect to your SharePoint Online tenant:
    Connect-SPOService -Url
  2. Once connected to your tenant, leave this management shell window open. You will be using this later to prepare your files for migration and upload them into the Azure service.

You can get the destination Azure URL and key from the IMPORT page of the Office 365 admin center.

To copy the key and URL:

  1. In the Office 365 admin center choose, the IMPORT tab.
  2. On the Import tab, choose the Plus symbol (+) > Ship data on physical hard drives.
  3. This opens a window with a brief summary of the next steps.Click Show key .
  4. These will be used when uploading the package and files. Leave this window open.

Choose Upload data over the network.

Store this key as securely as you would your Office 365 username and password.

Source: Import data to Office 365

Leave a Reply

Your email address will not be published. Required fields are marked *