| external help file | Microsoft.Online.SharePoint.PowerShell.dll-Help.xml |
|---|---|
| Module Name | Microsoft.Online.SharePoint.PowerShell |
| online version | https://learn.microsoft.com/powershell/module/microsoft.online.sharepoint.powershell/new-spomigrationpackage |
| applicable | SharePoint Online |
| title | New-SPOMigrationPackage |
| schema | 2.0.0 |
| author | samkabue |
| ms.author | speedta |
| ms.reviewer |
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.
New-SPOMigrationPackage [-SourceFilesPath] <String> [-OutputPackagePath] <String> [[-TargetWebUrl] <String>]
[[-TargetDocumentLibraryPath] <String>] [[-TargetDocumentLibrarySubFolderPath] <String>]
[-IncludeFileSharePermissions] [-ReplaceInvalidCharacters] [-IgnoreHidden] [-NoLogFile] [-NoAzureADLookup]
[<CommonParameters>]
Cmdlet to create a new migration package based on source files in a local or network shared folder.
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.
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".
-IgnoreHidden
Applicable: SharePoint Online
Switch to ignore hidden files and folders.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Applicable: SharePoint Online
Used to include permissions and sharing information into the generated manifest files in the package metadata.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Applicable: SharePoint Online
Switch to not lookup local user accounts in Microsoft Entra ID.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Applicable: SharePoint Online
Switch to replace characters in file and folder names that would be invalid in SharePoint Online.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Applicable: SharePoint Online
The directory location where the source content files exist. This directory will be enumerated to create the package metadata files.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
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 |