In Sharegate, having the full license (!), it is possible to run PowerShell scripts. In this script we could read a CSV-file to bulk migrate document libraries, lists or sites.

This can speed up the migration time, since you would only need to specify the objects once in a simple CSV-file instead of manually going through every object one by one, which is very time consuming.

In this example, we will perform a bulk incremental update (only copy the item if it is newer in the source than the corresponding item at the destination) of some document libraries from an on premise environment to different Site Collections in SharePoint Online.

The reports can be found in Sharegate as well, through the “Migration reports” button in the Ribbon.

Here’s the PowerShell script:

$csvFile = "C:\[path]\IncrementalUpdate.csv"
$table = Import-Csv $csvFile -Delimiter ";"
$copysettings = New-CopySettings -OnContentItemExists IncrementalUpdate

foreach ($row in $table)
{
    $srcSite = Connect-Site -Url $row.SrcUrl
    $srcList = Get-List -Name $row.SrcLib -Site $srcSite
    $dstSite = Connect-Site -Url $row.DestSite
    $dstList = Get-List -Name $row.DestLib -Site $dstSite
                
    Copy-Content -SourceList $srcList -DestinationList $dstList -CopySettings $copysettings
}

It might be possible that you need to add the “-Username” and -Password” (in SecureString format) parameters to the “Connect-Site” commands.

The CSV-file would look like this:

You could also schedule a task in Windows to run these kind of scripts overnight.