New-MigrationPackage
SharePoint Online: Creates a migration package
#Requires -Version 5.1
#Requires -Modules Microsoft.Online.SharePoint.PowerShell
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[string]$SourceFilesPath,
[Parameter(Mandatory = $true)]
[string]$TargetFilesPath
)
Process {
try {
$result = New-SPOMigrationPackage -SourceFilesPath $SourceFilesPath -TargetFilesPath $TargetFilesPath -ErrorAction Stop | Select-Object *
if ($null -ne $result) { $result | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format "yyyy-MM-dd HH:mm:ss") -PassThru -Force }
}
catch { throw }
}Path to source files
Path for target output