Tag Archives: coding

SharePoint migration from MySites to OneDrive for Business

Tristian O’Brien
SharePoint Technical Specialist
University of Brighton

Blog entry syndicated from my other blog that runs on GHOST.

I maintain a set of PowerShell scripts and processes to migrate many MySites from SharePoint 2010 to OneDrive for business.

As we know, PowerShell can automate many processes that you could perform using the user interfaces of SharePoint on premise or in the cloud.

So the general idea is to:

  • use a mapping file, where we have at least two columns. Column A in the windows on-premise username. Column B is the Office 365 (O365) login. I do have a third column, which is the destination OneDrive, but since this is almost usually the OneDrive logon, where any ‘@’ or ‘.’ are escaped as ‘_’
  • populate this file or database table with the users that you want to migrate
  • using PowerShell iterate through this list and
  • set users on-premise MySite to read only – I upload a separate master page and change the page status for this
  • in O365, assume the user is setup, licensed and provisioned. We use an account that has global admin rights in O365.
  • in O365, make sure that the global admin has access to the users OneDrive by adding it as a secondary admin
  • use ShareGate PowerShell to migrate the data. I know this is a cheat, but there are many reasons to use ShareGate such as insane mode, using Azure Storage and logging. Here are some other thoughts on Azure Storage.
  • when content has migrated successfully, timestamp the user profile on-premise with a date migrated value – later on we deploy some timer jobs to with delete or recycle after a specified time period.

Take a sneak peek at the https://github.com/devacuk/UoBMigration.  This is some code that I prepared for the dev.ac.uk event co-hosted by UCISA and JISC in February 2018. Slides are available here.  Much of the knowledge I accrued in order to do this are as a result of being awarded a UCISA bursary that paid the costs of travel, conference entrance fee and accommodation to MicroSoft IGNITE 2017.  For blogs on Microsoft Ignite, click here

I strongly suggest that if you do work in IT for a UK Higher Education institution, that you apply for the bursary yourself. Where this particularly helped is that I attended sessions about the latest developments in PowerShell, the tooling and Office 365. I found it particularly valuable to meets engineers from Microsoft Azure, ShareGate, MetaLogix and other vendors of migration products.

The only downside is that it is a corporate event, so one particular query about how and when any throttling of content into and out of Office 365 may occur, didn’t really get any answers from Microsoft, as I guess this kind of detail is a trade secret, I get that.

ShareGate offered some good advice on their experience with organisations way bigger than my institution, in that if you use their tools to manually migrate, use different tabs for different migration tasks. If using it in its PowerShell guise, then split the job up. Although managing that particular task would be a challenge in terms of organisation. I guess you could containerise the server using say Docker but ShareGate licenses would be needed for those individual containers I guess.

Another aspect of IGNITE is the sheer scale if it. I had planned to attend various sessions, but this wasn’t always possible due to sessions being placed far apart, overcrowding at some times and the warm weather. If I went again, I would be prepared for that though.

This blog post also appears on http://blogs.brighton.ac.uk/tristianobrien/

Interested in finding out more about a UCISA bursary, then visit UCISA Bursary Scheme.

UCISA welcomes blog contributions and comment responses to blog posts from all members. If you would like to contribute a new perspective or opinion on a current topic of interest, simply contact UCISA’s marketing manager Manjit Ghattaura via manjit.ghattaura@it.ox.ac.uk

 

The views expressed on UCISA blogs are the authors’ and do not necessarily reflect those of UCISA