I have the internal project for my company to move the document libraries from SharePoint 2013 on premises to SharePoint 2013 O365. There are only about 100 clients that need to be moved, so I started by opening the files on both sites using the “Open with Explorer” and just doing a drag and drop of folder contents from the old to the new.

Now about a quarter of the way through, our primary sales guy is not happy because all the “modified” dates in the O365 site read the day that I transferred the files. He states… with vigor… that he needs the original modified dates.

Can anyone give me a process to move files (not using a 3rd party application like ShareGate) when the modified date will be the same in the new site as it is in the old site?

  • I love this idea! My problem is that I can use the MSFT tool to migrate from shared drives to SPOL and it keeps the modified and modified by but when I apply my other metadata tags, it replaces that info with my info. I will write two workflows to automate this: one to store the original modified / modified by to a variable, then another which on change will check to see if it matches and if not, switch it back. Once I'm done with the migrations and before turning the sites over to the owners, I'll disable the workflows so they don't keep changing it back. Thanks for this idea - I was stumped!
    – Jeanette
    Commented Nov 22, 2019 at 19:19

3 Answers 3


You can use the SharePoint Online Management Shell to migrate on-prem content (from file shares and on-prem SharePoint) to SharePoint Online. This client preserves the created, modified by, and author information.

# Run from the SharePoint Online Management Shell 
$creds = (Get-Credential [email protected])

$sourceFiles = '\\server\share\sales\package'
$sourcePackage = '\\server\share\sales\package'

$targetPackage = '\\server\share\sales\packageTarget'
$targetWeb = 'https://contoso.sharepoint.com/sites/sales'
$targetDocLib = 'Documents'

# Create new package from export
Export-SPWeb -Identity "http://mysharepointserver/sites/myweb" `
    -Path $SourcePackage `
    -ItemUrl "/Lists/ListToExport" `

# Convert package to a targeted one by looking up data in target site collection
$convertedPackage = ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath $sourceFiles `
    -SourcePackagePath $sourcePackage `
    -OutputPackagePath $targetPackage `
    -TargetWebUrl $targetWeb `
    -TargetDocumentLibraryPath $targetDocLib `
    -Credentials $creds

# Encrypt, upload to Azure, and submit the migration
$report  = Invoke-SPOMigrationEncryptUploadSubmit -MigrationSourceLocations $convertedPackage `
    -TargetWebUrl $targetWeb `
    -Credentials $creds

# Get the progress of the migration job
Get-SPOMigrationJobProgress -AzureQueueUri $report.ReportingQueueUri `
    -TargetWebUrl $targetWebUrl `
    -JobIds $report.jobId `
    -EncryptionParameters $report.Encryption `
    -Credentials $creds
  • could you explain in a bit more detail how this works? What is the "new package from export" url pointing to? What is "Lists/ListToExport" pointing to? Is that just any site? or the target site? Will the whole site be overwritten by this?
    – teylyn
    Commented Aug 28, 2018 at 23:17

Unfortunately their is no supported method from MSFT to migrate data from on-prem to SharePoint Online. Only thing they tell the customer to use the 3rd party tools to migrate the stuff.

If you are only concern about the Modified date & Modfified by. Then i am thinking if you can try this(required extra work).

  • Create two extra columns TempModfide date & tempModifiedName.
  • then copy the values from orginal column to these columns.
  • Now move the files to destination and sharepoint will update OOTB column.
  • now you need to copy back data from temp to original.

read this blog as well(talking about use 3rd party tool if you want preserve the Modified date): http://blogs.technet.com/b/ptsblog/archive/2013/11/04/migrating-file-shares-to-sharepoint-online.aspx


Looks like the Sharepoint Migration Tool can now help and do this


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.