Forum Discussion
can PnpOnline script move files to a different library and retain same created and modified dates?
- Aug 02, 2025
The Move-PnPFile command automatically preserves metadata such as creator and time during migration.
The best way to move files between SharePoint libraries while preserving Created, Modified, Author, and Editor metadata is to use the SharePoint Migration API via the PnP Framework Migration module or SharePoint Migration Tool (SPMT). Unlike PnP.PowerShell, which uses standard upload methods that can't set system-managed fields, the migration API is designed specifically for high-fidelity transfers and supports metadata preservation at scale. This approach is officially supported by Microsoft, reliable for large volumes, and avoids the limitations and manual overhead of Power Automate.
------------------------------------
Don't forget to mark as solution if my answer suits you