how to copy list from one sitecollection to another sitecollection
-
04-10-2020 - |
سؤال
What is the best way to automate to copy a list from one site collection to another. We don't want to create a list template manually and moved to another site collection and all that process.
we need something to automate. may be using powershell. but trying to know what is the best way to do it.
المحلول
you can use the SharePoint designer and create a workflow to copy the lists item from source to destination.
Copy item from one list to another, using Sharepoint designer workflow and also check this link
you can try 3rd part tool Copy a List Item To Another Site Collection (and Other Workflow Conductor 1.5 Cross-Site Collection Features)
You can try the below powershell script to copy a list to different site collection.
Function CopyList([string]$SourceWebURL, [string]$TargetWebURL, [string]$ListName, [string]$BackupPath)
{
#Get the Source List
$SourceList =(Get-SPWeb $SourceWebURL).Lists[$ListName]
#Export the List from Source web
Export-SPweb $SourceWebURL -ItemUrl $SourceList.DefaultViewUrl -IncludeUserSecurity -IncludeVersions All -path ($BackupPath + $ListName + ".cmp") -nologfile
#Import the List to Target Web
import-spweb $TargetWebURL -IncludeUserSecurity -path ($BackupPath + $ListName + ".cmp") -nologfile
}
#Call the function
CopyList "http://sharepoint.crescent.com" "http://sharepoint.crescent.com/teams/marketing" "Banner" "C:\Temp\"
Read more: http://www.sharepointdiary.com/2012/12/copy-list-between-sites-powershell.html#ixzz3cUGkZB8l