Commands › SharePoint Online

Set-SPOMigrationPackageAzureSource

SharePoint Online Microsoft.Online.SharePoint.PowerShell Set-*

Cmdlet to create Azure containers, upload migration package files into the appropriate containers and snapshot the uploaded content.

Quick start script

# Set-SPOMigrationPackageAzureSource — 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-SPOMigrationPackageAzureSource
$before | Format-List

# 3. Make the change
Set-SPOMigrationPackageAzureSource -AccountKey <String> -AccountName <String> -MigrationPackageAzureLocations <MigrationPackageAzureLocations>

# 4. Verify and diff
$after = Get-SPOMigrationPackageAzureSource
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 4 parameter sets

ImplicitSourceExplicitAzure

Set-SPOMigrationPackageAzureSource -MigrationSourceLocations <MigrationPackageLocation>
 [-FileContainerName <String>] [-PackageContainerName <String>] [-AzureQueueName <String>]
 -AccountName <String> -AccountKey <String> [-EncryptionParameters <EncryptionParameters>] [-NoUpload]
 [-NoSnapshotCreation] [-EncryptionMetaInfo <MigrationFileEncryptionInfo[]>] [-NoLogFile] [-Overwrite]
 [-ParallelUpload] [<CommonParameters>]

ImplicitSourceImplicitAzure

Set-SPOMigrationPackageAzureSource -MigrationSourceLocations <MigrationPackageLocation>
 -MigrationPackageAzureLocations <MigrationPackageAzureLocations>
 [-EncryptionParameters <EncryptionParameters>] [-NoUpload] [-NoSnapshotCreation]
 [-EncryptionMetaInfo <MigrationFileEncryptionInfo[]>] [-NoLogFile] [-Overwrite] [-ParallelUpload]
 [<CommonParameters>]

ExplicitSourceExplicitAzure

Set-SPOMigrationPackageAzureSource -SourceFilesPath <String> -SourcePackagePath <String>
 [-FileContainerName <String>] [-PackageContainerName <String>] [-AzureQueueName <String>]
 -AccountName <String> -AccountKey <String> [-EncryptionParameters <EncryptionParameters>] [-NoUpload]
 [-NoSnapshotCreation] [-EncryptionMetaInfo <MigrationFileEncryptionInfo[]>] [-NoLogFile] [-Overwrite]
 [-ParallelUpload] [<CommonParameters>]

ExplicitSourceImplicitAzure

Set-SPOMigrationPackageAzureSource -SourceFilesPath <String> -SourcePackagePath <String>
 -MigrationPackageAzureLocations <MigrationPackageAzureLocations>
 [-EncryptionParameters <EncryptionParameters>] [-NoUpload] [-NoSnapshotCreation]
 [-EncryptionMetaInfo <MigrationFileEncryptionInfo[]>] [-NoLogFile] [-Overwrite] [-ParallelUpload]
 [<CommonParameters>]

Parameters (16)

ParameterTypeRequiredWhat it controls
-AccountKey String yes The account key for the Azure Storage account.
-AccountName String yes The account name for the Azure Storage account.
-AzureQueueName String An optional name of the Azure Storage Reporting Queue where import operations lists events during import. This value must be in lower case and conform to Azure's queue naming rules.
-EncryptionMetaInfo MigrationFileEncryptionInfo[] PARAMVALUE: MigrationFileEncryptionInfo[]
-EncryptionParameters EncryptionParameters An EncryptionParameters object. See [New-SPOMigrationEncryptionParameters](/powershell/module/microsoft.online.sharepoint.powershell/new-spomigrationencryptionparameters) for more information.
-FileContainerName String The optional name of the Azure Blob Storage container that will be created if it does not currently exist. It will hold the uploaded package content files. The value must be in lower case and conform to Azure's...
-MigrationPackageAzureLocations MigrationPackageAzureLocations yes A set of fully qualified URLs and SAS tokens representing the Azure Blob Storage containers that hold the package content and metadata files and an optional Azure Storage Reporting Queue. This object is returned...
-MigrationSourceLocations MigrationPackageLocation yes Possible Source locations to migrate.
-NoLogFile SwitchParameter Indicates to not create a log file. The default is to create a new CopyMigrationPackage log file within the directory specified within the SourcePackagePath parameter.
-NoSnapshotCreation SwitchParameter Indicates to not perform snapshots on the content in the containers. The default is to snapshot each of the packages files in the containers.
-NoUpload SwitchParameter Indicates to not upload the package files. The default is to upload all the package files.
-Overwrite SwitchParameter
-PackageContainerName String The optional name of the Azure Blob Storage container that will be created if it does not currently exist. It will hold the uploaded package metadata files. The value must be in lower case and conform to Azure's...
-ParallelUpload SwitchParameter Whether to enable parallel upload of files to Azure.
-SourceFilesPath String yes The directory location where the package's source content files exist.
-SourcePackagePath String yes The directory location where the package's metadata files exist.

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