When you’re moving from a homedirectories / fileshares (mapped to driveletters) based environment to a situation where you want your users to work in Onedrive for Business and Sharepoint Online, the best way to do so is to remove the homedirectories and shares and give your users access to Onedrive for Business and Sharepoint Online. One choice enforces adoption.
Of course, you also need to make the data compliant first, and upload it to Office 365. You can either let your users do this, or you can use my free tool!
O365Migrator will provision, authorize, clean up and upload. Everything you need to move from homedirectories or fileshares to Onedrive for Business and Sharepoint Online in one simple free tool.
- pre-creates Onedrive Storage on demand for O365 licensed users
- sets administrative permissions on each account for the account used to migrate the data
- makes the homedirectories fully compliant with Onedrive requirements (no sync issues!)
- makes fileshares fully compliant with Sharepoint Online requirements
- automatic detection of the O4B url’s and library names
- multi-threading allows you to upload homedirectories or subfolders simultaneously
- full logging, automatic handling of errors where possible
- it’s powershell, open source, but it has a GUI!
- can be run on multiple machines or locations with different accounts at the same time
- retains original file creation dates
- Differential upload: only upload new/changed files
- Subfolder targeting
- Retry function for failed files/folders
- Your data is now safe from ransomware like Cryptolockers
- html report in an automatically created O4BMoved folder of any changes that had to be made to his/her folder/file structure
How to use for homedirectories
- Make sure your users exist in Office 365 and are licensed, several days before you migrate
- Ensure your admin/migration user has a license (E3/E1) or provisioning will fail
- Use the pre-provisioning and authorization options of O365Migrator to ensure their Onedrive storage space is created (this won’t overwrite any existing data)
- Ensure their onedrives have been provisioned (log in as a few of them or browse their unique url)
- identify the login names of the user you wish to migrate in UPN format (office 365 login name)
- identify the paths to their home directories (UNC or local)
- Create a CSV file with two columns. The header of the first colum should be ‘username’, the second column should be ‘path’. Then add your users to it.
- Verify the homedirectories
- Upload them
How to use for fileshares
- Identify the URL to your site (usually in the form of https://tenant.sharepoint.com/siteXXX
- Identify the document library’s title (the ‘name’ field in the library properties)
- Select the folder you wish to upload
- Verify it first with the left button
- Upload it with the right one
How to use for both of the above
- Install the required components on your migration machine:
- Run ‘Set-ExecutionPolicy Unrestricted’ in an elevated Powershell window, sign the script, or run the script in ByPass mode
- Download (O365Migrator_v1.00.zip) or O365Migrator_v0.9 and unzip it locally
- Right click all files and unblock them if necessary
- Run O365Migrator.ps1 from the cmdline, NOT from ISE! (leave the other files in the same folder!)
- The csv file in the zip is an example file for homedirect migration
- Log files will be in %APPDATA%
- Specifying a subfolder is optional, this will create a subfolder in the destination and upload there instead of to the root
- Make sure you don’t set the document library property that enforces checkout/checking
- Use a cloud-sourced Admin account (not synced from somewhere)
- Do not use MFA on this admin account, SpO CSOM doesn’t support MFA
Retrying failed items
The script has no built in functionality for this, you’ll have to either re-run it (note it will overwrite anything already there), or fix any issues you encounter in the log manually.
Microsoft caps the maximum speed at which you can upload using CSOM. There are different throttles, the first is user based, which you can circumvent by using multiple instances. If you surpass that, you will get blocked at the tenant level. This is why you should always do a test migration first! If this tool can’t help you, use the Sharepoint Online File Import Service, which isn’t capped.
I’m not a real programmer, this code is meant as a Proof Of Concept. I do not guarantee this product will work in your setup, and I offer no dedicated support, I try to help everyone on a best-effort basis but also have to work for a living. So make sure you test well and understand the code before you use it.