none
ConvertTo-SPOMigrationTargetedPackage does not seem to work if you use content types

    Question

  • Migrating content from on-premises SharePoint to SharePoint online (office 365).

    The following code (abridged - only shows the export from on premises SharePoint and the ConvertTo-SPOMigrationTargetedPackage command) does work if that the documents in a library are moved and given a content type.  The problem is that what was once a nice site collection content type becomes an orphaned list content type and so it is not useable in a production scenario.

    Export-SPWeb -Identity $weburl -ItemUrl "/sites/test/Docs" -Path "\\vmware-host\Shared Folders\Test\SPImportSite_RAW_Docs" -NoFileCompression -IncludeVersions 4

    ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath $sourceFiles -SourcePackagePath $sourceFiles -OutputPackagePath $targetPackage -TargetWebUrl $targetWeb -TargetDocumentLibraryPath $targetDocLib -Credentials $creds  -NoAzureADLookup

    So I am thinking that the logical thing to do is move the whole site.  The following code (again abridged) does not work though.  It gives an error ConvertTo-SPOMigrationTargetedPackage : Parameter set cannot be resolved using
    the specified named parameters, the inference is that -TargetDocumentLibraryPath is mandatory but clearly this is not relevant to a web migration.

    Export-SPWeb -Identity $weburl  -Path "\\vmware-host\Shared Folders\Test\SPImportSite_RAW" -NoFileCompression

    ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath $sourceFiles -SourcePackagePath $sourceFiles -OutputPackagePath $targetPackage -TargetWebUrl $targetWeb -Credentials $creds

    I think my question is am I missing something or is ConvertTo-SPOMigrationTargetedPackage a bit 'beta'?

    Tuesday, April 19, 2016 2:00 PM