web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / compare two SharePoint...
Power Automate
Suggested Answer

compare two SharePoint sites files

(0) ShareShare
ReportReport
Posted on by
After migrating our SharePoint environment, we identified duplicated files between the original and migrated sites.
we need to perform a comprehensive comparison of files between the source (original SharePoint) and target (migrated SharePoint) environments.
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,834 Super User 2026 Season 1 on at
     

    To perform a comprehensive comparison of files between your original SharePoint site and the migrated SharePoint site, you'll want to identify duplicates, missing files, and any discrepancies in metadata (like modified dates, file sizes, or authors).

    Here's a step-by-step approach:


    Step 1: Export File Metadata from Both Sites

    Use PowerShell with the PnP PowerShell module to extract file metadata from both environments.

    Example command:

     

    # Connect to SharePoint

    Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/YourSite" -Interactive

    # Export file metadata

    Get-PnPListItem -List "Documents" -PageSize 500 | 

    Select-Object -Property FileLeafRef, FileRef, Author, Editor, TimeCreated, TimeLastModified |

    Export-Csv -Path "OriginalSiteFiles.csv" -NoTypeInformation

    Step 2: Compare the Two CSV Files

    Once you have both CSVs, you can compare them using Excel, Power BI, or a script (Python or PowerShell).

    Would you like me to help you:

    • 📥 Create a Python script to compare the two CSVs?
    • 🧾 Generate a report showing duplicates, missing files, and mismatches?

    If you already have the CSVs, feel free to upload them here, and I can help you analyze them directly.

     

    🏷️ Tag me if you have any further questions or if the issue persists.

    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.

    ❤️ Give it a Like if you found the approach useful in any way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 636

#2
Valantis Profile Picture

Valantis 372

#3
11manish Profile Picture

11manish 335

Last 30 days Overall leaderboard