Migrating users homefolders or fileshares to OneDrive/Sharepoint with PowerShell

Moving files from on premise fileservers are a task more and more organizations are working with, both home folders to OneDrive and fileshares to sites. Microsoft have created a nice graphical interface for this task "Microsoft SharePoint Migration Tool", you can check it out in my blog post
"Migration users homefolders to OneDrive with Microsoft SharePoint Migration Tool"

But there are some limitations, and in many cases, it might be simpler to just script the process. Microsoft has also created a guide for that too.
The guide are called "Upload on-premises content to SharePoint Online using PowerShell cmdlets"

The guide is decent, but I wanted to help people understand it and be able to use the script without to much SharePoint knowledge. 

I have just copied the script from Microsoft into my Github to try to make it more understandable and created a video showing how it works


First version is without any modifications except for correction of 2 minor errors in the article and I have also added notation about what steps in the article are used during the different parts of the cmdlet. Most likely there will be a version 2 soon with some added features and modifications
https://github.com/OTvedt/Scripts-For-Sharing/blob/master/OneDrive/PS-UploadToSharePoint.ps1
NB! 

Be aware that you must run this on a domain joined computer with a user that have access to the files and fulfil the necessary prerequisites, including "SharePoint Online Management Shell" . The target are a OneDrive site for a user in my example, but it will work against any site where the user have permission.

You can download the simple version that makes it easier to understand the process from HERE
The more modified version that still might get new features from HERE
or visit my GitHub repository to check out some of my other scripts HERE
Direct link to video are HERE

Popular posts from this blog

Installing Android on a Hyper-V virtual machine

MDT: TimeZoneName and index number list

Quick guide on how to run BgInfo background as Group Policy login