This is an example for importing files from file system and file shares to SharePoint.
- After you've launched ShareGate Desktop, click PowerShell.
- You can also open PowerShell directly from your Windows Explorer and access the Sharegate module by typing in the following:
- Connect to your destination SharePoint site, this is the site that contains the library you want to copy content to (see Connect-Site).
Note: If your site contains blank spaces, ensure to place it within double quotes (ex: "http://game2/sites/Site with Space/")
$dstSite = Connect-Site -Url "http://myfarm2/sites/mydestinationsite"
- Get your destination library that you want to copy content to (see Get-List).
$dstList = Get-List -Site $dstSite -name "Documents"
- Import the folder content from file system or file shares to the destination library (see Import-Document)
$result = Import-Document -DestinationList $dstList -SourceFolder "\\MyShare\MyFolderThatContainsFilesToImport\"
- You can print the result in the windows or export the migration report to an Excel file (see Export-Report).
$resultResult : Operation completed successfully. SessionId : 140220-1 SiteObjectsCopied : 0 ItemsCopied : 205 Warnings : 0 Errors : 0 PS C:\> Export-Report -CopyResult $result -Path C:\Reports\MyImportDocumentsReports.xlsx