SharePoint Find Large Files – Manual & PowerShell Methods

Mack John ~ Published: February 19th, 2025 ~ SharePoint ~ 7 Minutes Reading

Most of the SharePoint Online users struggle to find large files in SharePoint Online because they are unaware of how to use search or filter to locate files by size. If you are also facing this issue, this guide will help you to locate large files quickly and efficiently.

SharePoint is a widely used platform for collaboration purposes. Therefore, dealing with large files and folders is common especially as organizations expand their use of SharePoint for document management

Searching for large files is also crucial for SharePoint’s flawless performance. Therefore, in this guide, we will discuss the different methods through which one can filter out the high storage consumption files. So, let’s get started.

Why Do Finding Large Files Matter?

Locating and finding large files is an important task in SharePoint Online for managing site storage and optimizing site responses.

  • Impact on Performance – Larger files take longer to load, affecting the user experience.
  • Search efficiency – Bigger files can clutter search results which makes it more difficult to find relevant files.
  • Storage Intensive – They creates “SharePoint Online storage quota exceeded” issues. 
  • Efficient Compliance – It is important to track and manage oversized files for compliance and auditing purposes.

Whether you are an IT administrator or a SharePoint Online user it is necessary to learn how to find and manage large files for optimizing your SharePoint environment.

Find Large Files in SharePoint Online Using Storage Metrics

One of the simplest ways to locate large files in SharePoint Online is by using the Storage Metrics feature. This is a built-in method available to site admins that allows you to see the storage consumption of your site collection. However, it also helps you by providing details of individual files and folders.

Here are the steps in SharePoint Find Large Files:

  • Step 1. Firstly, navigate the SharePoint Online site.
  • Step 2. Secondly, click on the Settings” icon and select Site Settings.
  • Step 3. Lastly, under Site Collection Administration, click on Storage Metrics.
  • Step 4.  Finally, you will see the total storage used by the site. Additionally, you can also do a deep-down analysis for folders and individual files.

This method is good for quickly identifying the largest files within a specific site. However, it is unable to provide a tenant-wide view or allow you to automate the search process for multiple sites.

Search Large Files Using the Size Property

SharePoint Search allows you to filter and find large files by using Keyword Query Language (KQL). The Size property in KQL can help you locate files based on their size.

Example Queries:

  • Size > 5000000: Finds files larger than 5 MB.
  • Size > 100000 AND filetype:pdf: Finds PDF files larger than 1 MB.

Steps to search using this method:

  • Go to the Search bar on your SharePoint Online site.
  • Enter the above queries to filter files by size.

This method is fast, especially for users who don’t want to dive into administrative settings or PowerShell. However, it is limited to the site you are currently working on and doesn’t provide a bulk report.

Use PowerShell to Find Large Files

PowerShell provides a more robust and automated way to find large files across your SharePoint sites. The commands listed below can help you to generate detailed reports of large files. This command helps you to field files either in specific site collections or across the entire tenant.

PowerShell Script for Finding Files Over 1 GB:

# Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
# Function to find large files in SharePoint
Function Find-SPOAllLargeFiles([String]$SiteURL, [Microsoft.SharePoint.Client.Folder]$Folder) {
    # Logic to find and report large files
}
# Call the function
Get-SPOAllLargeFilesRpt "https://yourcompany.sharepoint.com/sites/sitecollection"

This script checks files larger than 1 GB in the given site collection and exports the data to a CSV file for further analysis.

Advantages of Using the PowerShell Method:

  • Automates the process of identifying large files.
  • Can be customized to suit your specific needs (size limits, file types, etc.).
  • Provides a detailed report that can be saved and shared.

Disadvantages :

  • Requires administrative access and knowledge of PowerShell.

Locate Large Files Across a Site Collection

For those looking to identify large files across an entire site collection, PowerShell offers a script that processes all document libraries within the site collection. Here is a PowerShell code to find files over 2 GB:

# Connect to SharePoint Online
Connect-PnPOnline -Url "https://yourcompany.sharepoint.com/sites/sitecollection" -Credentials (Get-Credential)
# Get all document libraries and find files larger than 2GB
$Libraries = Get-PnPList | Where-Object {$_.BaseType -eq "DocumentLibrary"}

This command helps in auditing large files across multiple libraries in a site collection, making it easier to manage oversized files across your SharePoint environment.

Find Large Files Across the Entire Tenant

Sometimes, you need to search for large files across the entire SharePoint Online tenant. This is especially useful for organizations with multiple site collections and thousands of users.

# Connect to Admin Center
Connect-PnPOnline -Url "https://yourtenant-admin.sharepoint.com" -Interactive
# Get all site collections and search for large files
$SiteCollections = Get-PnPTenantSite | Where-Object { $_.Template -NotIn ("SRCHCEN#0", "APPCATALOG#0") }

This method can provide a comprehensive view of all large files across your SharePoint Online tenant, making it easier to manage storage and implement strategies for handling large files.

Check File Sizes Along With Version History

Sometimes, it is not just the file size that matters but also its version history. Files with multiple versions can consume significant storage. So, it is also crucial to check the version history to find large files in SharePoint efficiently.

PowerShell Script of Checking Size:

# Get file sizes along with version history
Connect-PnPOnline -Url "https://yourcompany.sharepoint.com/sites/sitecollection" -Interactive
$Files = Get-PnPListItem -List "Documents" -Fields FileLeafRef, SMTotalFileStreamSize, _UIVersionString

This script helps identify large files and their version history which helps to enable you to manage both current and past file versions efficiently.

Alternate Solution For Migrating Large Files to a Sperate Site

In some scenarios, admins want to separate the large files to another site for better file organization. To facilitate this an admin can store their large files to a different tenant by using an advanced solution. However, the manual method for migrating these large files requires lots of effort and time. 

In this case, if you want to go with an advanced and automated method you should use SharePoint Migration Tool. This tool is recommended by Microsoft MVPs and experts. You can download it from below by clicking on the download button.

Conclusion

In SharePoint find large files without knowing efficient search can be a hectic task for admins and users. However, it is crucial for optimizing performance, managing storage, and ensuring compliance. In this write-up, we have discussed how you can use different methods like Storage Metrics, Search with the Size, or advanced solutions like PowerShell to automate the search process across multiple sites or your entire tenant. Additionally, we have also mentioned a common scenario for managing large files and a solution to efficiently migrate large files.

Frequently Asked Questions

Q1. Can the SharePoint storage metric show the large files?

A – Yes, using the storage metrics one can filter out the large files in SharePoint that occupy more storage.

Q2. How to use Keyword Query language in SharePoint for searching large files?

A – You can use KQL easily by specifying the size of the files that you are looking for. For instance, size > 9000000, shows all files larger than 9 MB.

Q3. Can I use PowerShell commands to find large files in SharePoint Online?

A – Yes, you can run the PowerShell commands but you need to be proficient in executing the PowerShell to get the expected results.