How to Migrate SharePoint 2019 Lists and Version History to SharePoint Online
Question details
The user needs to migrate lists from an on-premises SharePoint Server 2019 environment to SharePoint Online while ensuring that all item version history is preserved.

- Product
- SharePoint Server 2019, SharePoint Online
- Device & OS
- not provided
- Scenario
- Migrating local SharePoint 2019 data to the cloud and retaining historical versions of list items.
- Observed behavior
- The standard SharePoint Migration Tool (SPMT) does not natively support SharePoint 2019, requiring a workaround to move lists and their version histories successfully.
Ensure you have administrative access to both your SharePoint Server 2019 environment and your Microsoft 365 tenant, and verify that you can install an on-premises data gateway on your local network.
Migrate SharePoint 2019 Lists Using Power Automate and PowerShell
Since the official SharePoint Migration Tool (SPMT) lacks direct support for SharePoint 2019, you can build a custom integration using Power Automate and a PowerShell script to extract and migrate list data and version history.
The SharePoint Migration Tool (SPMT) officially supports SharePoint Server 2010, 2013, and 2016. To migrate from SharePoint 2019, administrators must rely on custom scripts, Power Automate flows, or third-party tools.
Using an on-premises data gateway allows cloud-based Power Automate flows to securely interact with your local SharePoint 2019 lists. A PowerShell script can then be utilized to handle the extraction of complex version history metadata.
Download and install the Microsoft on-premises data gateway on a local server that has network access to your SharePoint Server 2019 environment. Sign in with your Microsoft 365 administrator credentials to register the gateway.
Write a PowerShell script using SharePoint Server Management Shell to extract the target lists from SharePoint 2019. Ensure the script is explicitly coded to iterate through item versions and export this data into a structured format like CSV or JSON.
Log into Microsoft Power Automate and create a new automated flow. Add a connection using the on-premises data gateway you previously installed to establish a link between the cloud and your local data.
Configure the Power Automate flow to parse the exported list data and map the local columns to the corresponding columns in your target SharePoint Online list. Set up actions to append the historical versions chronologically.
Run the PowerShell script and Power Automate flow on a small sample list first. Verify in SharePoint Online that the list items appear correctly and that the version history dropdown displays the expected historical data.

Try WPS Office for Your Document Management Needs
If you are evaluating your Microsoft 365 infrastructure and looking for a lightweight, cost-effective office suite for your organization's daily tasks, WPS Office is an excellent choice. It provides a robust, free alternative to Microsoft Office that easily handles documents, spreadsheets, and presentations.

Frequently Asked Questions
Does the SharePoint Migration Tool (SPMT) support SharePoint Server 2019?
No, the SPMT officially supports only SharePoint Server 2010, 2013, 2016, and file shares. Migrating from SharePoint 2019 requires custom solutions like Power Automate, PowerShell scripts, or third-party migration software.
Will I lose my version history if I manually move files to SharePoint Online?
Yes, manual copy-pasting or basic uploading will only transfer the latest version of the file or list item and set the current date as the creation date. To preserve version history, you must use a scripted solution or a specialized migration tool that maps historical versions.
What is the purpose of the on-premises data gateway in this migration?
The on-premises data gateway acts as a secure bridge, allowing cloud-based services like Power Automate to access, read, and transfer data from your local SharePoint Server 2019 environment without exposing your local network directly to the internet.
Are there third-party alternatives to using PowerShell for SharePoint 2019 migration?
Yes, many enterprise migration tools (such as Sharegate, AvePoint, or Metalogix) offer built-in support for SharePoint 2019 to SharePoint Online migrations, seamlessly handling list structures, permissions, and version histories without requiring custom code.




