Move Every User's Home Drive to OneDrive Using Microsoft's Free Migration Tool

TL;DR
- Microsoft's free SharePoint Migration Tool moves on-prem home drives straight into each user's personal OneDrive, with no third-party license required.
- Personal OneDrive sites must exist before you migrate; pre-provision them with the Request-SPOPersonalSite PowerShell cmdlet if users have not signed in yet.
- The migration tool impersonates each destination URL, so the admin account running it needs Site Collection Administrator rights on every OneDrive site.
- For large user counts, a CSV mapping each source file path to its target OneDrive URL lets you run the whole migration as one batch.
Pushing legacy file shares to the cloud usually means moving two things: shared data into SharePoint, and each person's home drive into their own OneDrive. This guide covers the second one end to end. You will provision the destination, pre-create every user's OneDrive site, grant the impersonation rights the migration depends on, and run Microsoft's free SharePoint Migration Tool, either one user at a time or as a CSV-driven batch.

Set up the destination tenant
Before you can move anything, the target Office 365 environment needs to exist with licensed users.
- Provision a net new tenant in Office 365. It will be provisioned with the .onmicrosoft domain. You can purchase directly or under the CSP model through a distributor.
- Add and verify the domain. In the 365 Admin Center, go to Setup > Domains > Add Domains. Add the domain and verify it with a TXT record.
- Add users and apply licenses. Add them one at a time, bulk upload via PowerShell, bulk upload via CSV, or sync with AD Connect (opens in new tab). Make sure each user has a license that includes OneDrive.
To bulk import users with passwords via PowerShell:
Import-Csv -Path 'FilePath' | foreach {New-MsolUser -UserPrincipalName $_.UserPrincipalName -FirstName $_.FirstName -LastName $_.LastName -DisplayName $_.DisplayName -Password $_.Password -ForceChangePassword $False}Pre-provision OneDrive for every user
Each user needs a personal OneDrive site to receive their data. By default, that site is created the first time the user signs in. In a new deployment where users have not signed in yet, you have to run scripts to pre-provision the sites.
Confirm whether a site already exists
Sign in to the tenant with global admin credentials and open the SharePoint Admin Center.

Take note of the admin URL at the top of the page, then click User Profiles on the left. If you do not see this page, click Return to classic SharePoint center in the bottom left.

Select Manage User Profiles.

Search for a user, click the dropdown, and select Manage Site Collection Owners.

If the user has signed in, they already have a personal site and the following appears. Note that later in setup you will add a user for impersonation rights in the Site Collection Administrators section.

If they have not signed in, you will most likely see the following instead.

Create the sites with PowerShell
Next, run PowerShell to create the personal sites. If you are pre-provisioning OneDrive for many users, create a list of them and save it as a file, for example a text file named Users.txt containing user1@contoso.com, user2@contoso.com, user3@contoso.com. Download the SharePoint Online Management Shell (opens in new tab).
Run it as Admin and connect to the tenant. The URL is the admin URL you noted earlier:
$adminUPN="<the full email address of a SharePoint administrator account, example: jdoe@contosotoycompany.onmicrosoft.com>"
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://Orgname-admin.sharepoint.com -Credential $userCredential

Run Request-SPOPersonalSite. If you only have a few users, run them one at a time. For many users, feed in the text file you created earlier.


When the commands finish, gather the list of all OneDrive URLs. Run the following and enter your admin URL again:
$TenantUrl = Read-Host "Enter the SharePoint Online Tenant Admin Url"
$LogFile = [Environment]::GetFolderPath("Desktop") + "\OneDriveSites.log"
Connect-SPOService -Url $TenantUrl
Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like '-my.sharepoint.com/personal/" | select Url | Out-File $LogFile -Force
Write-Host "Done! File saved as $($LogFile)."

Add impersonation rights to all sites
The SharePoint Migration Tool asks for an admin user to impersonate all destination URLs when you configure the migration job. You either run a script to grant this or do it manually if you do not have many users.
Manually
Go back to the steps from the previous section and add your admin user under the Site Administrators section in the SharePoint Admin Center. The path again is User Profiles > Manage User Profiles > Manage Site Collection Owners. Do this for every user.

Scripted
Download the AdminRights.ps1 (opens in new tab) script and modify it. The first two values are your global admin creds, $spAdminUrl is your admin URL from the first section, and $spMyURL is found on the SharePoint Admin Center site collection page:


Run SharePoint Online PowerShell as admin and run Set-ExecutionPolicy Unrestricted, saying yes to the prompts. Then paste your modified .ps1 script and run it. It adds the necessary permissions to all users.

Build a CSV to import (optional)
This section is only necessary if you have many users and do not want to enter each one individually.
- Create a CSV with two columns: Source and Target Web.
- Paste the file paths of your home drive users in the Source column, and the OneDrive URLs you gathered earlier in the Target Web column.

Download and configure the SharePoint Migration Tool
Download the tool on the server where the home drives are located. Here is the link for the tool (opens in new tab). Agree and install.

After installing, sign in with the global admin credentials you gave impersonation rights to in the previous section.

Click Start your first migration.

If you are migrating only a few users and did not create a CSV, select File Share. If you created a CSV, select that option.

If you chose File Share
Choose the file path of your user, then fill in their SharePoint URL.



If you chose CSV
Upload your CSV here.

Review, configure, and run
In either case, you can start a batch migration.

You can configure many settings, including migrating data only within a specific date range.

When you are done configuring, click migrate to start the job.

Frequently asked questions
Do I need a paid tool to migrate home drives to OneDrive?
No. Microsoft's free SharePoint Migration Tool handles file share to OneDrive migrations. You only need the destination tenant set up with OneDrive-licensed users and the right impersonation permissions.
Why do I have to pre-provision OneDrive sites?
A user's personal OneDrive site is only created the first time they sign in. If this is a fresh deployment and users have not signed in, the destination site does not exist yet, so you run Request-SPOPersonalSite to create the sites before migrating.
What permission does the admin account running the migration need?
Site Collection Administrator (impersonation) rights on every destination OneDrive site. You can add this manually per user in the SharePoint Admin Center, or script it across all users.
Migrating files is step one. Securing what lands in OneDrive is the part that lasts.
Once data is in OneDrive and SharePoint, external sharing, oversharing, and drift become your problem. CloudCapsule checks OneDrive and SharePoint sharing controls plus 250+ others across every tenant you manage in about 60 seconds each.
Run a free scan
Written by
Nick Ross
CEO · Microsoft MVP · Founder, T-Minus 365
Nick is not just a CEO, he's a respected thought leader and influencer in the MSP space. Tens of thousands of MSPs learn through his YouTube channel, T-Minus365. Nick has been honored as a three-time Microsoft MVP for his educational content; his expertise and influence are the backbone of our mission, ensuring that you are in the best hands when it comes to security.
Nick joined Pax8 in 2017, where he would ultimately oversee product management for PSA and Microsoft integrations. Following his tenure at Pax8, Nick has continued to demonstrate his leadership prowess as an executive at various MSPs, culminating in his most recent role at Sourcepass.
Nick holds a Bachelor's Degree in Business Management from Florida State University, as well as a Minor Degree in Entrepreneurship. In his free time, Nick is an avid hiker, reader, and fitness-junkie.


