Bulk migrate to OneDrive from personal drive with SharePoint Migration Tool (Manual)

In this manual I will explain step by step how to migrate your users from their personal drive to OneDrive using bulk migration in SharePoint Migration tool. This includes preparing the users OneDrive, granting permissions, and setup SharePoint Migration tool.

Image

Prerequisites

Before we begin, we will need a migration station, I would recommend to use a server designed for this purpose. On the migration server make sure you install the following:

Steps

Step 1: In this first step we will create a txt file with all user email adresses. You can either create the list yourself, or easier, we get the list using PowerShell from Office 365. First connect to Office 365

$userCredential = Get-Credential -Message "Please fill in your Office 365 admin credentials."

Connect-MsolService -Credential $userCredential

Now run the following command to get all email adresses in a list, this will export all email adressen from Office 365:

Get-MsolUser | select UserPrincipalName | Export-Csv c:\2azure\export.txt

Now let’s prepare the txt file for import, we will need to remove the double quotes from the file before we can import it.

(Get-Content c:\2azure\export.txt) | % {$_ -replace ‘"‘, “”} | out-file -FilePath c:\2azure\export.txt -Force -Encoding ascii

Step 2: Now we will need to review the file, remove the email adressen that do not need to be prepared. The file is located in the path c:\2azure\export.txt (or any other location where you placed the file) The file should look like this:

TYPE Selected.Microsoft.Online.Administration.User
UserPrincipalName
test@2azure.nl
onedrive@2azure.nl

Step 3: Now we can pre-provision the OneDrive. Change the value of $adminurl to reflect your own SharePoint admin URL. From your Office 365 admin Portal click on SharePoint admin center, the URL should end like this: 2azurenl-admin.sharepoint.com

## Fill in the SharePoint admin URL
$adminurl = "https://2azurenl-admin.sharepoint.com"
 
## Now we will connect with SharePoint
Connect-SPOService -Url $adminurl -Credential $userCredential

## Import the users from the CSV.
$users = Get-Content c:\2azure\export.txt

## Lets loop through the file, and create a personal site for each user
 foreach ($i in $users)
 {
 Request-SPOPersonalSite -UserEmails $i
 }

Step 3: Now verify that all personal SharePoint sites have been created.

Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like '-my.sharepoint.com/personal/'" | select Url

Step 4: Now we will prepare the CSV file that we will use to perform the actual migration. I’ve prepared a demo csv that you can use to migrate the personal folders:

In the first column you will need to place the source, in the fourth the destination, and the last will be the folder in de OneDrive. In the demo file we will create a documents folder.

Step 5: Install the SharePoint Migration tool. Download: Link Once installed, run the SharePoint Migration tool and log in with your Office 365 administrator account that has access to SharePoint.

Step 6: After you’ve started “your first migration” you are now required to select how you want to migrate. Select JSON or CSV file for bulk migration

Step 7: Now select your CSV file, and click Add.

Step 8: Now review your migration, for this demo I just migrated one user…

Step 9: The last step is choosing your final settings. To avoid issues with OneDrive, we need to make sure that old OneNote files will be converted, so click on View all settings.

Make sure to select Migrate OneNote folder as OneNote notebook

Now press migrate and just wait for the migration to complete!

6 Comments

Add a Comment

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