Commands › SharePoint Online

ConvertTo-SPOMigrationTargetedPackage

SharePoint Online Microsoft.Online.SharePoint.PowerShell ConvertTo-*

Use this cmdlet to convert your XML files into a new migration package.

Quick start script

# ConvertTo-SPOMigrationTargetedPackage — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
ConvertTo-SPOMigrationTargetedPackage -Credentials <CredentialCmdletPipeBind> -SourceFilesPath <String> -SourcePackagePath <String> | Format-List

# 3. Export for evidence / drift tracking
ConvertTo-SPOMigrationTargetedPackage | Export-Clixml .\SPOMigrationTargetedPackage-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

DocumentLibraryImport

ConvertTo-SPOMigrationTargetedPackage [-SourceFilesPath] <String> [-SourcePackagePath] <String>
 [[-OutputPackagePath] <String>] [-TargetWebUrl] <String> -TargetDocumentLibraryPath <String>
 [-TargetDocumentLibrarySubFolderPath <String>] [-UserMappingFile <String>]
 -Credentials <CredentialCmdletPipeBind> [-AzureADUserCredentials <CredentialCmdletPipeBind>]
 [-NoAzureADLookup] [-TargetEnvironment <TargetEnvironment>] [-ParallelImport] [-PartitionSizeInBytes <Int64>]
 [-NoLogFile] [<CommonParameters>]

ListImport

ConvertTo-SPOMigrationTargetedPackage [-SourceFilesPath] <String> [-SourcePackagePath] <String>
 [[-OutputPackagePath] <String>] [-TargetWebUrl] <String> -TargetListPath <String> [-UserMappingFile <String>]
 -Credentials <CredentialCmdletPipeBind> [-AzureADUserCredentials <CredentialCmdletPipeBind>]
 [-NoAzureADLookup] [-TargetEnvironment <TargetEnvironment>] [-ParallelImport] [-PartitionSizeInBytes <Int64>]
 [-NoLogFile] [<CommonParameters>]

Parameters (15)

ParameterTypeRequiredWhat it controls
-AzureADUserCredentials CredentialCmdletPipeBind Receives Microsoft Entra User Credentials
-Credentials CredentialCmdletPipeBind yes Fill out the Regular Credentials (Get-Credential)
-NoAzureADLookup SwitchParameter Switch parameter that says if the command should or should not look up for Microsoft Entra ID.
-NoLogFile SwitchParameter Switch Parameter to determine if you should get or not a log file.
-OutputPackagePath String Output package path
-ParallelImport SwitchParameter Switch parameter to boost file share migration performance.
-PartitionSizeInBytes Int64 Define the partition size in Bytes where it will be located the target package.
-SourceFilesPath String yes Defines the temporary Path where are located the XML source files.
-SourcePackagePath String yes Defines the source package path location.
-TargetDocumentLibraryPath String yes Defines the target document library path.
-TargetDocumentLibrarySubFolderPath String Defines the target document library subfolder path.
-TargetEnvironment TargetEnvironment Defines the Target environment: Production, ProductionChina, None or OnPremises.
-TargetListPath String yes Defines the Target list path
-TargetWebUrl String yes Defines the Target Web URL of the package.
-UserMappingFile String Defines the file mapping of the user.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.