New-SPOMigrationPackage

Cmdlet to create a new migration package based on source files in a local or network shared folder.

Syntax

New-SPOMigrationPackage
   [-SourceFilesPath] <String>
   [-OutputPackagePath] <String>
   [[-TargetWebUrl] <String>]
   [[-TargetDocumentLibraryPath] <String>]
   [[-TargetDocumentLibrarySubFolderPath] <String>]
   [-IgnoreHidden]
   [-IncludeFileSharePermissions]
   [-NoAzureADLookup]
   [-NoLogFile]
   [-ReplaceInvalidCharacters]
   [<CommonParameters>]

Description

Cmdlet to create a new migration package based on source files in a local or network shared folder.

Note

Limits on the SPO package size and file size

Limit Max Size (Gb) Description
Package Size 2-4 The whole package can't exceed 4Gb
File Size 2 A single file inside the source folder can't exceed 2 Gb.
Target Size - target site should remain non-accessible to end user until migration is complete

Note

Limits on HTTP Get

Limit API Get (chars) Description
Action GET on API 260 chars The size of the API GET request can't exceed 260 chars

Examples

-----------------------EXAMPLE 1-----------------------------

New-SPOMigrationPackage -SourceFilesPath \\fileserver\share\folder1 -OutputPackagePath d:\MigrationPackages\Folder1_SrcPkg

New-SPOMigrationPackage -SourceFilesPath \\fileserver\share\folder1 -OutputPackagePath d:\MigrationPackages\Folder1_SrcPkg -TargetWebUrl https://contoso.sharepoint.com/sites/TargetSite/TargetWeb -TargetDocumentLibraryPath "Shared Documents" -TargetDocumentLibrarySubFolderPath "Sub Folder/Target Folder"

This example creates a new set of migration source package metadata files, using default URL values, in the d:\MigrationPackages\Folder1_SrcPkg directory based on content files found in the \fileserver\share\folder1 source location.

-----------------------EXAMPLE 2-----------------------------

New-SPOMigrationPackage -SourceFilesPath \\fileserver\share\folder1 -OutputPackagePath d:\MigrationPackages\Folder1_SrcPkg -TargetWebUrl https://contoso.sharepoint.com/sites/TargetSite/TargetWeb -TargetDocumentLibraryPath "Shared Documents"

This example creates a new set of migration source package metadata files in the d:\MigrationPackages\Folder1_SrcPkg directory based on content files found in the \fileserver\share\folder1 source location. The package is prepared using the document library path “https://contoso.sharepoint.com/sites/TargetSite/TargetWeb/Shared Documents”.

Parameters

-IgnoreHidden

Switch to ignore hidden files and folders.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-IncludeFileSharePermissions

Used to include permissions and sharing information into the generated manifest files in the package metadata.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-NoAzureADLookup

Switch to not lookup local user accounts in Azure Active Directory.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-NoLogFile

Used to not create a log file. The default is to create a new CreateMigrationPackage log file within the directory specified within the OutputPackagePath parameter.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-OutputPackagePath

The directory location where the output package metadata files will be saved. If the directory does not exist, it will be created.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-ReplaceInvalidCharacters

Switch to replace characters in file and folder names that would be invalid in SharePoint Online.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-SourceFilesPath

The directory location where the source content files exist. This directory will be enumerated to create the package metadata files.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-TargetDocumentLibraryPath

The web relative document library to use as the document library part of the base URL in the package metadata. If this is not supplied, “Documents” will be used within the package metadata instead.

Type:String
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-TargetDocumentLibrarySubFolderPath

Specifies the document library relative subfolder to use as the folder path part of the base URL in the package metadata. If this is not provided, no value will be used within the package metadata. The files will be homed under the document library root.

Type:String
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-TargetWebUrl

The fully qualified web URL to use as the web address part of the base URL in the package metadata. If this is not provided, “http://fileserver/sites/user” will be used instead within the package metadata.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

Inputs

None

Outputs

System.Object