This is an example for copying SharePoint lists from one SharePoint site to another. You can apply this pattern to copy sites, lists, libraries, site columns, site content types, groups, managed metadata and workflows.
- Click PowerShell on the lower left menu.
- If you prefer launching PowerShell from Windows, type Import-Module Sharegate after launching.
PS C:\> Import-Module Sharegate
- Connect to your source SharePoint site (see Connect-Site).
PS C:\> $srcSite = Connect-Site -Url http://myfarm1/sites/mysourcesite
- Connect to your destination SharePoint site (see Connect-Site).
PS C:\> $dstSite = Connect-Site -Url http://myfarm2/sites/mydestinationsite
- Get the lists and libraries you would like to copy to the destination site (see Get-List).
PS C:\> $srcList = Get-List -Site $srcSite -name Documents
- Copy the lists and libraries to the destination site (see Copy-List)
PS C:\> $result = Copy-List -List $srcList -DestinationSite $dstSite
- You can print the result in the windows or export the migration report to an Excel file (see Export-Report).
PS C:\> $resultResult : Operation completed successfully. SessionId : 140221-1 SiteObjectsCopied : 1 ItemsCopied : 189 Warnings : 0 Errors : 0 PS C:\> Export-Report $result -Path C:\MyReports\CopyListReports.xlsx Report exported with success to: C:\MyReports\CopyListReports.xlsx