Copy-PorteoFolders.ps1



function Copy-PorteoFolder {
    param(
        $folder,
        $srcConnection = (Get-PnPConnection),
        $destConnection = (Get-PnPConnection)
    )
    Copy-SSPFiles -SrcFolder $folder -DestFolder $folder -SrcConnection $srcConnection -DestConnection $destConnection
}

function Copy-PorteoFolders {
    param(
        $folderNames,
        $srcConnection = (Get-PnPConnection),
        $destConnection = (Get-PnPConnection)
    )

    if (-not $folderNames) {
        $folderNames = ("SiteAssets", "Shared Documents")
    }
    foreach ($folder in $folderNames) {
        Copy-PorteoFolder -Folder $folder -SrcConnection $srcConnection -DestConnection $destConnection
    }
}