Migrating from file shares to OneDrive and SharePoint can seem like a daunting task, but with proper planning and communication, your project can be a resounding success for both the migration team and business users. The key is to concentrate on three core pillars: cleanup, organization and migration.


By taking the time to clean up your content before migration, you can speed up the process, reduce risk, and deliver a more streamlined and useful target environment. Content cleanup occurs at three levels: individual, team or department, and organization-wide. Remember that many migration tools can help with the cleanup process.

Determine what needs to be migrated and what doesn’t.

The first goal of cleanup is to identify content that you’re not going to migrate. In particular, look for redundant, outdated and trivial (ROT) information, which often accumulates over time in IT systems.

There are multiple ways to separate this data from the content you are going to migrate. Here are two common approaches:

  • Create a folder for things that you’re not going to migrate.
  • Use a naming convention to identify content that will not be migrated

Correct issues that could cause problems.

As part of the content cleanup, check for issues that could cause problems during the migration. For example, be sure to look for filenames with characters that are not supported in SharePoint and OneDrive, including these: ” * : < > ? / \ |

Also check for files that are missing their file extension, which usually happens because a user manually removed it. You might be surprised how often issues like this come up.

Here are all the restrictions and limitations in OneDrive and SharePoint that Microsoft lists:

In addition, Microsoft provides the following troubleshooting tips:


Legacy systems frequently have nested folder structures, and subfolders might even use unique permissions. For example, a folder might include both shared and private subfolders. Use the migration as an opportunity to flatten out these file structures and reorganize the content. Some migration tools can help with these tasks.

Choose OneDrive or SharePoint appropriately.

Be sure to separate private content into OneDrive and shared content into SharePoint sites. I’ve observed situations in which shared folders were migrated to the OneDrive of an individual, such as a department manager, which causes issues when that person changes roles or moves on from the company. But even if a user leaves the organization and their account is deleted, don’t despair: By default, their OneDrive is retained for 30 days and their manager is automatically given access to it (and you can grant access to other people), so any data that needs to be kept can be moved to another location.

The Three Keys to a Successful OneDrive and SharePoint Migration
Figure 1: Granting access to another user’s OneDrive for 30 days.

Once the teammates Microsoft 365 account is deactivated, their OneDrive is typically deleted in 30 days, but you can change this in the SharePoint admin center from 30 through 3650 days:

The Three Keys to a Successful OneDrive and SharePoint Migration
Figure 2: Changing the setting in SharePoint admin center.

You can also Specify the default retention for a user’s OneDrive when the user is deleted
In PowerShell with the following cmdlet:

SetSPOTenant -OrphanedPersonalSitesRetentionPeriod <int32>

This specifies the number of days after a user’s Active Directory account is deleted that their OneDrive for Business content will be deleted. The value range is in days, between 30 and 3650, and the default value is 30.

The Three Keys to a Successful OneDrive and SharePoint Migration

Don’t lift and shift; flatten folder structures.

Use the migration as an opportunity to reorganize shared folders and subfolders into more manageable SharePoint document libraries. By flattening the folder structure, you can organize content across multiple libraries, utilizing settings and security that are specific to the content while minimizing unique permissions on content within the structure.

Flattening folder structures also provides an opportunity to apply metadata to improve search results in SharePoint and improve organization to make browsing for content easier for users.

The Three Keys to a Successful OneDrive and SharePoint Migration
Figure 3: Converting folders to document libraries.


If applicable, pre-provision OneDrive for your users.

Normally, a user’s OneDrive is created the first time they access OneDrive. If you will be migrating your users’ files on their behalf before they begin using OneDrive, you may need to pre-provision OneDrive for each of them using the SharePoint Online Management Shell.

The user accounts that you’re pre-provisioning must be allowed to sign in and must also have a SharePoint license assigned. In addition, you must be a global or SharePoint administrator and must be assigned a SharePoint license.

The following code snippet will pre-provision OneDrive in batches of 199.

$Credential = Get-Credential
Connect-MsolService -Credential $Credential
Connect-SPOService -Credential $Credential -Url https://contoso-admin.sharepoint.com
$list = @()
$i = 0
#Get licensed users
$users = Get-MsolUser -All | Where-Object { $_.islicensed -eq $true }
#total licensed users
$count = $users.count
foreach ($u in $users) {
    Write-Host "$i/$count"
    $upn = $u.userprincipalname
    $list += $upn
    if ($i -eq 199) {
        #We reached the limit
        Request-SPOPersonalSite -UserEmails $list -NoWait
        Start-Sleep -Milliseconds 655
        $list = @()
        $i = 0
if ($i -gt 0) {
    Request-SPOPersonalSite -UserEmails $list -NoWait

Prepare your users for the upcoming change.

Communication is key! Provide clear timelines, set expectations and detail how the migration will impact the users. Include any calls to action, such as steps they need to take to delete, clean up or organize content prior to migration.

Be available to help users during the process. Provide office hours to answer questions, give guidance and allow users to voice their concerns.

Provide documentation for how content previously stored on files shares maps to OneDrive or SharePoint, so users know where to find their files after the migration.

Don’t skip the pilot migration!

Perform a pilot migration with a small set of users prior to an incremental or cut-over migration. This is a critical step necessary to validate the migration process — you’ll learn about the performance of the migration tool and adjust your timelines, uncover issues you have overlooked, gather insight for user communication, and collect user feedback before proceeding.


A migration from file shares to OneDrive and SharePoint is a complex undertaking, but with proper planning and preparation and careful execution, you can deliver a successful project that inspires users to eagerly adopt the new platforms.

For more valuable Microsoft 365 migration advice, check out the recordings of the Migrations and Modernizations sessions from The Experts Conference (TEC) 2021.

About the Author

Andy Huneycutt

Enterprise collaboration specialist, training instructor, coach, and consultant since 2010 focusing on Microsoft 365, SharePoint, Microsoft Teams, Power Apps, Power Automate, and more. President of Upskill Tech, a company dedicated to helping workers to better understand and successfully implement Microsoft solutions. Based out of Charlotte, NC, Andy is currently a leader for the Charlotte Area SharePoint User Group (casug.org). Additionally, he organizes Charlotte SharePoint and Microsoft 365 Saturday. Microsoft Most Valuable Professional (MVP) since 2017 and Microsoft Certified Trainer (MCT).  


  1. Jacob

    Thanks for sharing this helpful info with us, and also you can check out tools like Sharegate and Gs Richcopy360, both are ideal to migrate to clouds like SharePoint, Onedrive , Azure blob ,AWS S3, and Google Drive

  2. Misja

    Before you start migrating, please assess what is linked to and in your current folders and files. Stand-alone user applications with links to folders and files will break, Office files linking to other files (especially Excel guru’s love to link) will break, flat-file databases, etc. Probably stuff the IT department is not aware of, but probably rather important for many a business process.

  3. Hal Sclater

    Flattening folder structures is not viable for anything other than very small migrations. Try migrating TBs of data to SharePoint and flattening all the folders, your users will hate you.

Leave a Reply