Monthly Archives: March 2016

Introduction to Sharegate and Sharepoint My Sites Migration

I recently had the opportunity to design and implement two Sharepoint migrations.  One was from Sharepoint 3.0 to Office 365 and the other was Sharepoint 2003 to Sharepoint 2013.

For the original project (WSS 3.0 – O365), we originally chose the Dell Sharepoint Migration Suite, however, I encountered a lot of issues with it, mainly the fact that I was having difficulty migrating data because it was very inconsistent, some of it was there and some of it was missing.

In the end, I opted to use a tool called “Sharegate” and I had such good experience with it, that I wanted to write a whole post dedicated to it.  Sharegate’s main feature is the Migrating Tool, but it does include a Sharepoint Management application that can report on anything that you could think of in a customer’s environment.  Need a report for files a certain size?  Got that.  Need a report to audit site collection permissions?  Got that too  Need a report to list the content of every site collection and subsites?  Check that one off too.  It even has a nice tool to find obsolete permissions in your environment and automatically clean them up in preparation to a migration.  Sweet!

The migration interface is pretty easy to use, you just connect to the source Central Admin (or Site Collection or Subsite) and then connect to the destination Central Admin or Sharepoint Administrator in Office 365’s case.  You can then drag and drop the content to be copied and choose to overwrite or merge any differences.  This process can be done with Sharepoint, OneDrive and even Google Drive.  I also love the fact that you can run a pre-migration check report and be able to resolve any issues beforehand, so as to have the smoothest possible run.

Where I think this application excels the most, is the ease of use and how easy it is to map user and group permissions for content you are migrating for which a user is no longer active at your organization.  I was also able to script out the migration to save time and make sure any errors due to configuration of the migration minimized.

For those interested in my Sharegate Migration Powershell Script and how to use it for your My Sites migrations, follow these steps:

  1. Map your users and groups in the Sharegate Migration Tool, if you have no users, I would map the unresolved users and groups at the very least.
  2. In Sharegate, you should have the option to export this list into a SGUM file.
  3. Create a CSV file with the following headers, SourceURL, DestinationURL and sAMAccountName.  Populate these fields accordingly.  My CSV and Powershell was tailored specifically to migrate My Sites which is why you see the sAMAccountName field, which should be populated with the username of the person’s My Site who you are migrating.
  4. Put the CSV and SGUM file into the same folder as the below Powershell and run it.  I like to run it in the Powershell ISE.  The script will create a report for each user that it migrates.
#Import the Sharegate Powershell module.
Import-Module Sharegate

#Import CSV file with 3 columns; SourceURL, DestinationURL, sAMAccountName 
$table = Import-Csv -Path "C:\Script\SP2013-MySites-Restart.csv"
 
#Import user and group mappings from GUI exported file
$usermappings = Import-UserAndGroupMapping -Path "C:\Script\UserAndGroupMappings.sgum"

#Uncomment for incremental copy settings and uncomment copysettings parameter in line 22 "Copy-Site"
$copysettings = New-CopySettings -OnContentItemExists IncrementalUpdate

#Loop through each row in the CSV file
ForEach ($row in $table)
{
 #Set variables based on CSV columns
 $srcSite = Connect-Site -Url $row.SourceURL
 $dstSite = Connect-Site -Url $row.DestinationURL
 $username = $row.sAMAccountName

 #Copy site and capture migration results
 $result = Copy-Site -Site $srcSite -DestinationSite $dstSite -MappingSettings $usermappings -Merge -Subsites -InsaneMode -CopySettings $copysettings
 
 #Export results to Excel workbook
 Export-Report $result -Overwrite -Path C:\Script\MySites-Results\$username.xlsx
}
Advertisements

Cornerstone Technologies

Welcome back!  Whoa!  I haven’t written in this blog for a long time.  I have been very busy doing all sorts of things in the IT world.  I now work for an IT consulting outfit located in San Jose, CA called “Cornerstone Technologies“.  I specialize in the “Next Generation Datacenter” practice area which means that I work with a lot of public and private cloud technologies.  Mainly, Azure, Hyper-V and VMware.

In the past months I have done projects varying from SQL 2014 AlwaysOn Availability Groups to VMware Site Recovery Manager design and implementations to Sharepoint and Exchange to Office 365 migrations.

Though this blog is mainly devoted to System Center, I will also be including some posts in regards to other technologies that I think might help other IT professionals and also for my own reference.