Configuring SharePoint 2007

Web Application Authentication Providers

Only web applications with 'Authentication Type' Windows will be migrated. This can be checked by carrying out the following :

  1. Login to SharePoint ‘Central Administration’
  2. Click on ‘Application Management’ and then 'Manage web applications'
  3. Under 'Application Security' click on 'Authentication Providers'
  4. To the right of the screen the web application to verify should be selected with a list of authentication providers and the default zone set to 'Windows'.


Site Collection Access

In order to access data in SharePoint (Team Sites or My Sites/OneDrive) the account configured in CloudMigrator must be able to access the site collection being migrated. This can be accomplished three ways and is recommended that your consult your SharePoint Administrator :

  1. Adding a Policy for a Web Application
  2. Manually adding site collection administrators to each site collection
  3. Add Site Collection Administrator using PowerShell

Adding a Policy for a Web Application

  1. Login to SharePoint ‘Central Administration’
  2. Click  ‘Application Management > Application Security > Policy for Web Application'
  3. Select the web application from the dropdown if not already selected to apply the policy and click 'Add Users'
  4. Confirm the correct web application is selected and '(All zones)' is selected under 'Zones' and click 'Next >'.
  5. Enter the administrative user that will be used in CloudMigrator and check 'Full Control - Has full control' and click 'Finish'
     


Manually Add Site Collection Administrator

  1. Login to SharePoint ‘Central Administration’
  2. Click on ‘Application Management’ under 'SharePoint Site Management' click on 'Site Collection Administrators'
     
  3. Add the account to the ‘Secondary site collection administrator’ and then click ‘OK’

Add Site Collection Administrator using PowerShell

  1. The following script will need to be ran on the SharePoint server with administrative rights to SharePoint. The script will generate a .csv file containing the url each site.
    1. Specify a location for outputted .csv file by populating $saveSites or leaving the default 'c:\\sites.csv'

      try 
      {  
      	$saveSites = "c:\\sites.csv";
      	if($saveSiteListLocation -ne $null -AND $saveSites -ne "")
      	{
      		[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
      		$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
      		$websvcs = $farm.Services | where -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]}
      
      		[Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges(
      		{
      			$output = foreach ($websvc in $websvcs)
      			{
      				foreach ($webApplication in $websvc.WebApplications)
      				{     
      					foreach($siteCollection in $webApplication.Sites)
      					{
      							New-Object -TypeName PSObject -Property @{
      								Url = $siteCollection.Url
      							} | Select-Object Url
      							Write-host  $siteCollection.Url	
      					}
      				} 
      			}
      			$output | Export-Csv $saveSites -force -notypeinformation
      		});
      	}
      	else
      	{
      		Write-host "Save Site List Location has not been entered.";
      	}
      }
      catch 
      { 
      	Write-Host $error[0].Exception.Message -foreground red 
      } 
  2. Review the .csv file and remove any sites you do want to update with the site collection administrator. Populate the following :

    1. $userId - SharePoint administrator UserId of the user entered in the CloudMigrator eg "contoso\cloudmigrator"

    2. $userEmail - email address associated to the UserId entered above eg "cloudmigrator@contoso.com"

    3. $userName - name of the user eg"cloudmigrator"

    4. $removeAdmin - remove the above user from specified site collections default "N"

    5. $savedSites - location of the file specified in step 1;

      try
      {
      	[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 
      
      	$userId = "contoso\cloudmigrator"
      	$userEmail = "cloudmigrator@contoso.com"
      	$userName = "cloudmigrator"
      	$removeAdmin = "N"
          $savedSites = "c:\\sites.csv";
      	$siteUrls = Import-Csv $savedSites | select -ExpandProperty url
      
      	[Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges({
      
      		foreach($siteUrl in $siteUrls) 
      		{ 
      			try 
      			{ 
      				Write-host "Processing $siteUrl" 
      				$Site = New-Object Microsoft.SharePoint.SPSite($siteUrl) 
      				$Web = $Site.Rootweb 
      
      				
      				if($removeAdmin -eq "N")
      				{
      					$Web.SiteUsers.Add($($userId), $($userEmail),$($userName), "") 
      					$adminUser = $web.EnsureUser($($userId)) 
      					$web.Update() 
      
      					if($adminUser.IsSiteAdmin) 
      					{ 
      						Write-Host "$($userName) is already a site collection administrator " $web.Url
      					} 
      					else 
      					{ 
      						$adminUser.IsSiteAdmin = $true 
      						$adminUser.Update() 
      						write-host "$($userName) added as site collection administrator " $web.Url -ForegroundColor Green 
      					} 
      				}
      				else
      				{
      					$adminUser = $web.EnsureUser($($userId)) 
      					if($adminUser.IsSiteAdmin) 
      					{
      						$adminUser.IsSiteAdmin = $false 
      						$adminUser.Update() 
      						write-host "$($userName) removed as site collection administrator " $web.Url -ForegroundColor Green 
      					}
      					else
      					{
      						Write-Host "$($userName) is not site collection administrator."
      					}
      				}
      			} 
      			catch 
      			{ 
      				Write-Host $error[0].Exception.Message -foreground red 
      			} 		
      		} 
      		
      	});
      } 
      catch 
      { 
      	Write-Host $error[0].Exception.Message -foreground red 
      } 
      
      
      

SharePoint 2007 Shared Services Administration

  1. SharePoint 2010/2013/2016 may require this extra step. To allow CloudMigrator to get users with ‘My Sites’ the account entered in ‘Account Details’ requires the following permissions.

    1. Login to SharePoint ‘Central Administration’

    2. Click on ‘Shared Services Administration’

    3. Locate the shared service used for 'My Sites' web application. In the below screenshot 'Main Shared Service' is the default for all web applications.
    4. Click on the link in the left hand menu, in this example 'Main Shared Service' this will take you through to the portal.
    5. Click on 'Personalization services permissions'
    6. Check that the admin account performing the migration appears in the list with at least 'Manage User Profiles' rights. If the user does not exist, click on 'Add Users/Groups'. Search the user and check the box next 'Manage User Profiles' and click 'Save'

Generating the Team Sites list

  1. When migrating from SharePoint 2007 Team Sites are currently not supported when clicking 'Get Users'. The following PowerShell (Supported in SharePoint 2007/2010/2013/2016) script will list all the sites and subsites in your farm. Team Sites listed in the exported .csv file can added to the tool by clicking on 'File > Export User List'. 

    1. Add the team site urls you would like to migrate in the 'Export Name' column.

    2. Populate 'ExportObjectType' with 'TeamSite' without single quotes.

    3. Save any changes.
    4. Click on 'File > Import User List'  to populate the tool with your team sites.

try 
{  
	$saveSiteListLocation = "c:\\sitesandtitleslist.csv";
	if($saveSiteListLocation -ne $null -AND $saveSiteListLocation -ne "")
	{
		[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
		$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
		$websvcs = $farm.Services | where -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]}
		$webapps = @()

		[Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges(
		{
			$output = foreach ($websvc in $websvcs)
			{
				foreach ($webapp in $websvc.WebApplications)
				{     
					foreach($siteCollection in $webapp.Sites)
					{
						foreach($subWeb in $siteCollection.AllWebs)
						{
							New-Object -TypeName PSObject -Property @{
								Url = $subWeb.Url
								Title = $subWeb.Title
							} | Select-Object Url,title
							Write-host  $subWeb.Url "|" $subWeb.Title
						}
					}
				}
			}$output | Export-Csv $saveSiteListLocation -force -notypeinformation
		});
	}
	else
	{
		Write-host "Save Site List Location has not been entered.";
	}
}
catch 
{ 
	Write-Host $error[0].Exception.Message -foreground red 
}