Commands › SharePoint Online
New-SPOMigrationPackage
Cmdlet to create a new migration package based on source files in a local or network shared folder. > [!NOTE] > This cmdlet has been deprecated. To migrate to SharePoint and Microsoft 365 using PowerShell, see > Migrate to SharePoint using PowerShell.
Quick start script
# New-SPOMigrationPackage — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SPOMigrationPackage
$before | Format-List
# 3. Make the change
New-SPOMigrationPackage -OutputPackagePath <String> -SourceFilesPath <String>
# 4. Verify and diff
$after = Get-SPOMigrationPackage
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
New-SPOMigrationPackage [-SourceFilesPath] <String> [-OutputPackagePath] <String> [[-TargetWebUrl] <String>]
[[-TargetDocumentLibraryPath] <String>] [[-TargetDocumentLibrarySubFolderPath] <String>]
[-IncludeFileSharePermissions] [-ReplaceInvalidCharacters] [-IgnoreHidden] [-NoLogFile] [-NoAzureADLookup]
[<CommonParameters>]
Parameters (10)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.