Copy-PnPFile vs SharePoint Smart Copy
Both are free. The difference shows up once you need version history, original authors, or a large folder.
Quick answer
Should I use Copy-PnPFile or Smart Copy?
Copy-PnPFile, followed by Copy-PnPFileMetadata to restore dates and authors on the current version, when you are comfortable scripting and checking results yourself. Neither cmdlet keeps the original created/modified dates on prior versions — those show the date of the copy. Use Smart Copy to copy folders between sites — in the same tenant or between two tenants — without scripting, keeping every version's original dates and authors and getting a per-file report.Prior versions lose their original dates with PowerShell
Copy-PnPFile copies the versions, but their created/modified dates are not carried over. Copy-PnPFileMetadata only fixes the current version — it can't change older entries in version history. If audits or records rules depend on version dates, test before you rely on PowerShell.
| Copy-PnPFile | Copy-PnPFileMetadata | Smart Copy | |
|---|---|---|---|
| Price | Free | Free | Free (MIT open source) |
| Runs as | PowerShell cmdlet | PowerShell cmdlet | Windows desktop app |
| What it does | Copies files and folders (server-side copy job) | Syncs Created, Modified, Author and Editor onto files that already exist at the target. Copies no content | Copies files with their versions |
| Scope | Same tenant (across site collections) | Separate source and target connections | Same tenant or between two tenants (with Identity mapping) |
| Version history | Copied by default; -IgnoreVersionHistory skips it | Not applicable (no content copied) | Preserved |
| Current version dates and authors | Not preserved on its own; run Copy-PnPFileMetadata afterward | Restores them on the current item without adding a version | Preserved |
| Prior versions' created/modified dates and authors | Not preserved — show the copy date | Not supported — current item only | Preserved on every version |
| Per-file success/failure report | No (console output; -NoWait returns a job to poll) | No (-Verbose progress only) | Yes, exportable |
| Scripting skill needed | Yes | Yes | No |
The two-step PnP PowerShell approach
$src = Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/source -Interactive -ReturnConnection
$dst = Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/target -Interactive -ReturnConnection
# 1. Copy the content
Copy-PnPFile -SourceUrl "Shared Documents/Projects" `
-TargetUrl "/sites/target/Shared Documents" -Force -Connection $src
# 2. Restore Created, Modified, Author and Editor on the copies
Copy-PnPFileMetadata -SourceUrl "Shared Documents/Projects" `
-TargetUrl "Shared Documents/Projects" -Recursive `
-SourceConnection $src -TargetConnection $dstCopy-PnPFileMetadata copies no content. It updates fields on files that already exist at the target, using UpdateOverwriteVersion() so no new version is added, and skips any target it can't find. Large jobs are on you to check: Copy-PnPFile reports through console output (or a job you poll with -NoWait), and Copy-PnPFileMetadata logs progress with -Verbose. See the Copy-PnPFile docs.
How to choose
- Already scripting and want automation: Copy-PnPFile, then Copy-PnPFileMetadata.
- Only need to fix dates and authors on the current version of files already copied: Copy-PnPFileMetadata.
- Need prior versions to keep their original created/modified dates and authors: Smart Copy. The PowerShell cmdlets don't carry those over.
- Want versions kept without writing a script: Smart Copy.
- Need proof of what copied: Smart Copy's per-file report.
- Copying to another tenant: Smart Copy, in Multi-tenant mode with Identity mapping. Full version history copies across.
More detail: copy SharePoint files between sites with version history.
Frequently asked questions
Does Copy-PnPFile keep version history?
It copies the versions by default (the -IgnoreVersionHistory switch turns that off), but the original created and modified dates on prior versions are not carried over. Copy-PnPFileMetadata can only fix the current version, so older versions keep the date of the copy.
Can Copy-PnPFileMetadata fix dates on older versions?
No. It updates Created, Modified, Author and Editor on the current item only. Earlier entries in version history are not changed. Smart Copy keeps each version's original dates and authors.
What is Copy-PnPFileMetadata for?
It copies Created, Modified, Author and Editor from source files and folders to matching targets that already exist, without copying content. It is commonly run after Copy-PnPFile to restore those fields. Targets that are not found are skipped.
When is PnP PowerShell the right choice?
When you are already scripting with PnP PowerShell, want to automate the copy, and are comfortable verifying results yourself.
Can Smart Copy copy between tenants?
No. Smart Copy works within a single Microsoft 365 tenant only.
Get your first result in about 10 minutes
Download SharePoint Smart Copy, follow the step-by-step install guide, and run it against a real site the same afternoon. Nothing to license, nothing to renew.
- Download the Windows app from the latest release.
- Run it and sign in to your Microsoft 365 tenant.
- Pick a source and target site, then copy.
Email me when a new release ships
No marketing spam. One short email when a new release ships. You can unsubscribe anytime.
