Home » Blog » Office 365 » Top 3 Best Ways to Migrate SharePoint List to Another Site Easily
Office 365

Top 3 Best Ways to Migrate SharePoint List to Another Site Easily

  author
Published By Mohit Jha
Nimisha Ramesh
Approved By Nimisha Ramesh
Published On October 23rd, 2023
Reading Time 10 Minutes Reading

There are times when a user or an administrator needs to migrate SharePoint List to another site. It could be due to various reasons like moving your data to a new site, switching tenants, business mergers, etc. And when we talk about migrating SharePoint list to another site, there is a lot of crucial data involved in it that you cannot afford to lose. Thus, a trusted procedure and a solution are required to carry out a safe and effortless migration.

Table of Contents

What are the Different Ways to Migrate SharePoint List to Another Site?

In the following segment, we have discussed three ways using which you can migrate SharePoint List to another site. The first one is a tried and tested professional solution that makes the process quick and efficient. Moreover, there are hardly any chances of data loss if you opt for this automated solution. The second way of migrating your data is using PowerShell commands. The last option is exporting a list template and uploading it to the destination site. You can select any of the listed solutions depending on your checklist.

But before getting into them here is the quick way to perform this task –

5 Steps to Copy SharePoint List to Another Site

  • Step 1. Download, Install & Run Software on PC.
  • Step 2. Choose Office 365 as a Migration Platform.
  • Step 3. Enable Sites & Apply Date Filter Option.
  • Step 4. Login with Source & Destination Admin Details.
  • Step 5. Select SharePoint Address & Hit Start Button.

Method 1: Migrate SharePoint Lists to another Site Using Advanced Solution

Taking the importance of data into account, many experts recommend going with a professional solution. If you also want your migration process to be quick and efficient, you must try the Best SharePoint Online Migration Tool once. This application contains many advanced features that make the entire migration experience a breeze.

The software comes with an integrated dashboard and offers an intuitive interface that makes it easy to operate this tool. Additionally, this utility supports batch migration, making it easy for IT Administrators to migrate large amounts of data.

Download Now Purchase Now

Once you migrate your entire data, the software will generate a report showing all migration details. Moreover, the software has a Delta Migration option that will help you migrate only newly received items from SharePoint Site.

Read More: Find out how you can migrate SharePoint Online to Another Tenant

Method 2: Migrate SharePoint Lists via PowerShell

In order to migrate SharePoint List from one Site to another, users also get the option to use PowerShell commands. Although this is a free procedure, the complexity of this process is quite high. Any missed step or any typing error in the syntax can result in error messages. Thus, it would help if you had a certain level of technical expertise to run these commands.

If you are ready to go with this procedure, ensure you fulfill certain prerequisites.

• First of all, ensure that you have created a separate list, and both lists have the same columns.
• Make sure that you run PowerShell as an administrator.

Once both the prerequisites are done while migrating SharePoint list to another site, the next step is to run the PowerShell commands. While running the command, make sure that you modify all the configuration variables.

Install-Module -Name PnP.PowerShell

#Connect to the Source Site
Connect-PnPOnline -Url https://[entertenantname].sharepoint.com/sites/[name of source site] -Interactive

#Create the Template
Get-PnPSiteTemplate -Out C:\Temp\Lists.xml -ListsToExtract “List A”, “List B” -Handlers Lists

Get the List Data
Add-PnPDataRowsToSiteTemplate -Path C:\Temp\Lists.xml -List “List A”
Add-PnPDataRowsToSiteTemplate -Path C:\Temp\Lists.xml -List “List B”

#Connect to Target Site
Connect-PnPOnline -Url https://[entertenantname].sharepoint.com/sites/[name of destination site] -Interactive

#Apply the Template
Invoke-PnPSiteTemplate -Path “C:\Temp\Lists.xml”

In case the list items have attachments associated with them, then run the following command:

#Function to copy attachments between list items
Function Copy-SPOAttachments()
{
param
(
[Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.ListItem] $SourceItem,
[Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.ListItem] $DestinationItem
)
Try {
#Get All Attachments from Source list items
$Attachments = Get-PnPProperty -ClientObject $SourceItem -Property “AttachmentFiles”
$Attachments | ForEach-Object {
#Download the Attachment to Temp
$File = Get-PnPFile -Connection $SourceConn -Url $_.ServerRelativeUrl -FileName $_.FileName -Path $Env:TEMP -AsFile -force
#Add Attachment to Destination List Item
$FileStream = New-Object IO.FileStream(($Env:TEMP+”\”+$_.FileName),[System.IO.FileMode]::Open)
$AttachmentInfo = New-Object -TypeName Microsoft.SharePoint.Client.AttachmentCreationInformation
$AttachmentInfo.FileName = $_.FileName
$AttachmentInfo.ContentStream = $FileStream
$AttachFile = $DestinationItem.AttachmentFiles.Add($AttachmentInfo)
Invoke-PnPQuery -Connection $DestinationConn

#Delete the Temporary File
Remove-Item -Path $Env:TEMP\$($_.FileName) -Force
}
}
Catch {
write-host -f Red “Error Copying Attachments:” $_.Exception.Message
}
}

#Function to copy list items from one list to another
Function Copy-SPOListItems()
{
param
(
[Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.List] $SourceList,
[Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.List] $DestinationList
)
Try {
#Get All Items from the Source List in batches
Write-Progress -Activity “Reading Source…” -Status “Getting Items from Source List. Please wait…”
$SourceListItems = Get-PnPListItem -List $SourceList -PageSize 500 -Connection $SourceConn
$SourceListItemsCount= $SourceListItems.count
Write-host “Total Number of Items Found:”$SourceListItemsCount

#Get fields to Update from the Source List – Skip Read only, hidden fields, content type and attachments
$SourceListFields = Get-PnPField -List $SourceList -Connection $SourceConn | Where { (-Not ($_.ReadOnlyField)) -and (-Not ($_.Hidden)) -and ($_.InternalName -ne “ContentType”) -and ($_.InternalName -ne “Attachments”) }

#Loop through each item in the source and Get column values, add them to Destination
[int]$Counter = 1
ForEach($SourceItem in $SourceListItems)
{
$ItemValue = @{}
#Map each field from source list to Destination list
Foreach($SourceField in $SourceListFields)
{
#Check if the Field value is not Null
If($SourceItem[$SourceField.InternalName] -ne $Null)
{
#Handle Special Fields
$FieldType = $SourceField.TypeAsString

If($FieldType -eq “User” -or $FieldType -eq “UserMulti”) #People Picker Field
{
$PeoplePickerValues = $SourceItem[$SourceField.InternalName] | ForEach-Object { $_.Email}
$ItemValue.add($SourceField.InternalName,$PeoplePickerValues)
}
ElseIf($FieldType -eq “Lookup” -or $FieldType -eq “LookupMulti”) # Lookup Field
{
$LookupIDs = $SourceItem[$SourceField.InternalName] | ForEach-Object { $_.LookupID.ToString()}
$ItemValue.add($SourceField.InternalName,$LookupIDs)
}
ElseIf($FieldType -eq “URL”) #Hyperlink
{
$URL = $SourceItem[$SourceField.InternalName].URL
$Description = $SourceItem[$SourceField.InternalName].Description
$ItemValue.add($SourceField.InternalName,”$URL, $Description”)
}
ElseIf($FieldType -eq “TaxonomyFieldType” -or $FieldType -eq “TaxonomyFieldTypeMulti”) #MMS
{
$TermGUIDs = $SourceItem[$SourceField.InternalName] | ForEach-Object { $_.TermGuid.ToString()}
$ItemValue.add($SourceField.InternalName,$TermGUIDs)
}
Else
{
#Get Source Field Value and add to Hashtable
$ItemValue.add($SourceField.InternalName,$SourceItem[$SourceField.InternalName])
}
}
}
#Copy Created by, Modified by, Created, Modified Metadata values
$ItemValue.add(“Created”, $SourceItem[“Created”]);
$ItemValue.add(“Modified”, $SourceItem[“Modified”]);
$ItemValue.add(“Author”, $SourceItem[“Author”].Email);
$ItemValue.add(“Editor”, $SourceItem[“Editor”].Email);

Write-Progress -Activity “Copying List Items:” -Status “Copying Item ID ‘$($SourceItem.Id)’ from Source List ($($Counter) of $($SourceListItemsCount))” -PercentComplete (($Counter / $SourceListItemsCount) * 100)

#Copy column value from Source to Destination
$NewItem = Add-PnPListItem -List $DestinationList -Values $ItemValue

#Copy Attachments
Copy-SPOAttachments -SourceItem $SourceItem -DestinationItem $NewItem

Write-Host “Copied Item ID from Source to Destination List:$($SourceItem.Id) ($($Counter) of $($SourceListItemsCount))”
$Counter++
}
}
Catch {
Write-host -f Red “Error:” $_.Exception.Message
}
}

#Set Parameters
$SourceSiteURL = “https://[tenantnamehere].sharepoint.com/sites/[sitenamehere]”
$SourceListName = “[listnamehere]”

$DestinationSiteURL = “https://[tenantnamehere].sharepoint.com/sites/[sitenamehere]”
$DestinationListName = “[listnamehere]”

#Connect to Source and destination sites
$SourceConn = Connect-PnPOnline -Url $SourceSiteURL -Interactive -ReturnConnection
$SourceList = Get-PnPList -Identity $SourceListName -Connection $SourceConn

$DestinationConn = Connect-PnPOnline -Url $DestinationSiteURL -Interactive -ReturnConnection
$DestinationList = Get-PnPList -Identity $DestinationListName -Connection $DestinationConn

#Call the Function to Copy List Items between Lists
Copy-SPOListItems -SourceList $SourceList -DestinationList $DestinationList

If all the settings are fine and you performed all the steps correctly, then you will be able to migrate all your data as you want.

Also Read: A step by step guide to copy Document Library from one Site to another

Method 3: Migrate SharePoint Lists from One Site to Another via the Export Process

Now comes the final method of migration where you have to export the list from the Source site and then upload it to the Destination site. Although this is a simple process to perform, it is not a feasible process if you have a large number of SharePoint lists to be migrated.

Moreover, in the case of batch migration of SharePoint Lists, this procedure will take a considerable amount of time.

The steps to migrate SharePoint List to another site are as follows:

Step 1. Export Lists from the Source Site

  • Login to your SharePoint account and open List Settings.
  • Click on the “Save list as template” option under Permissions and Management section.

Step 2. Export SharePoint List to another Site

  • Go to the top-level site of the site collection that you want to copy and then click on Site Settings.
  • Click the List Templates option under the Galleries section.
  • Now comes the List Template Gallery window, choose the checkbox adjacent to the list template that you want to export.
  • Finally, click on the Download a copy button in the ribbon.

Step 3. Upload List to New Site

In the final step, you will need a .stp file that you downloaded in the previous steps.

  • First of all, go to the Site collection where you need to copy the list.
  •  Click on Site Settings >> Go to the Galleries section and click on List Templates.
  • Go to the Documents tab and hit the Upload Document button.
  • Click on Choose File and browse the .stp file.
  • Finally, click on the OK button.

Migrate SharePoint List to another Site – FAQs

Q. What are SharePoint Lists and what do they store?

A. SharePoint lists are one of its core components that are used to store and manage crucial information. These lists are tables similar to spreadsheets but with many advanced sets of features. They can create views, customize forms, and filter data.

 SharePoint lists can be used to store various forms of data like text, dates, numbers, and images. These lists can also store a complex form of data like lookup fields, hyperlinks, and many other things.

Q. What are the common issues or limitations that must be taken into note while migrating SharePoint list to another site?

A. There might be several issues that you might encounter as it varies from situation to situation. We have listed some of the most common issues and limitations that users face:

  • Permission and access rights
  • Difference in List templates between Sites
  • Incompatible data types and formats
  • Customization issues

Q. How do I migrate SharePoint Online List to another site?

A. As discussed in the above section, there are multiple ways in which you can migrate SharePoint lists from one site to another like a professional solution, PowerShell commands, and the export–import way. Although you can select any of these ways for migration, the first choice that many experts recommend is using the trusted migration tool discussed above.

Q. How long does it usually take to migrate SharePoint lists from one site to another?

A. There is no predefined time as the migration duration depends on multiple factors like the size of the list, its complexity, and the migration mode that you choose. The Internet bandwidth and machine configuration also matter when you use the automated tool for migration.

Read More: A Comprehensive Guide to Merge Two SharePoint Sites

Conclusion

Migrating SharePoint list to another site is a complex process if you don’t have the required technical expertise in the specific domain. Thus, to solve your issues and make the job simple, we have listed 3 different procedures that you can choose from. However, as per the expert’s recommendation, going with the professional solution is always the safest bet as it makes your job quick and also ensures secure migration of SharePoint list from one site to another.

Why Choose FREEVIEWER?

3M+

Happy Clients

250+

Products

100+

Countries

15+

Years of Experience