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.
Syntax
Default (Default)
New-SPOMigrationPackage
[-SourceFilesPath] <String>
[-OutputPackagePath] <String>
[[-TargetWebUrl] <String>]
[[-TargetDocumentLibraryPath] <String>]
[[-TargetDocumentLibrarySubFolderPath] <String>]
[-IncludeFileSharePermissions]
[-ReplaceInvalidCharacters]
[-IgnoreHidden]
[-NoLogFile]
[-NoAzureADLookup]
[<CommonParameters>]
Description
Cmdlet to create a new migration package based on source files in a local or network shared folder.
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
Applicable: SharePoint Online
Switch to ignore hidden files and folders.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-IncludeFileSharePermissions
Applicable: SharePoint Online
Used to include permissions and sharing information into the generated manifest files in the package metadata.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NoAzureADLookup
Applicable: SharePoint Online
Switch to not lookup local user accounts in Microsoft Entra ID.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NoLogFile
Applicable: SharePoint Online
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.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-OutputPackagePath
Applicable: SharePoint Online
The directory ___location where the output package metadata files will be saved. If the directory does not exist, it will be created.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ReplaceInvalidCharacters
Applicable: SharePoint Online
Switch to replace characters in file and folder names that would be invalid in SharePoint Online.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SourceFilesPath
Applicable: SharePoint Online
The directory ___location where the source content files exist. This directory will be enumerated to create the package metadata files.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TargetDocumentLibraryPath
Applicable: SharePoint Online
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.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 3 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TargetDocumentLibrarySubFolderPath
Applicable: SharePoint Online
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.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 4 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TargetWebUrl
Applicable: SharePoint Online
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, "https://fileserver/sites/user
" will be used instead within the package metadata.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
System.Object
Notes
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 |
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 |