SharePoint Live Storage Analytics

Tania Wrigley 40 Reputation points
2025-10-23T00:46:21.9633333+00:00

Hi

We are constantly running out of SharePoint storage space, we know which sites are largest users from the SharePoint Admin Centre, however we would like to run a daily or weekly report of the Top 10 sites and how much storage have they used in a day or week.

Is there a way to see this or a PowerShell we can run?

Thanks

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Answer accepted by question author
  1. Sophie N 6,140 Reputation points Microsoft External Staff Moderator
    2025-10-23T01:36:17.8533333+00:00

    Dear @Tania Wrigley,

    Thank you for reaching out to the Microsoft Q&A community. Monitoring SharePoint storage proactively is a common challenge, and I can provide a solution using PowerShell, which is the most effective way to automate the report you need. 

    The key is to use the SharePoint Online Management Shell with the Get-SPOSite cmdlet. This cmdlet can retrieve storage metrics for all sites. 

    Step 1: Connect to SharePoint Online PowerShell 

    First, you must install the SharePoint Online Management Shell and connect to your tenant. If you haven't already, follow the official guide here:  Get started with the SharePoint Online Management Shell | Microsoft Learn 

     

    Step 2: Use the PowerShell script to generate a report

    The script below will get all sites, select the relevant storage information, sort them by usage, and output the Top 10. You can schedule this script to run daily or weekly using Windows Task Scheduler. 

    Connect to SharePoint Online

    Connect-SPOService -Url https://<yourtenant>-admin.sharepoint.com 
    

    Get all sites, select storage metrics, sort by Usage (current storage), and select the top 10

    $Report = Get-SPOSite -Limit All | Select-Object Title, StorageUsageCurrent, StorageQuota, Url | Sort-Object StorageUsageCurrent -Descending | Select-Object -First 10 
    

    Display the report in the console

    $Report | Format-Table –AutoSize 
    

    (Optional) Export the report to a CSV file with a timestamp

    Before running the Export-Csv command, you need to make sure that the C:\Temp folder has been created. You can add the following line before the export command:

    New-Item -ItemType Directory -Path "C:\Temp" -Force 
    $Timestamp = Get-Date -Format "yyyyMMdd" 
    $Report | Export-Csv -Path "C:\Temp\SPO_Top10Storage_$Timestamp.csv" -NoTypeInformation 
    

    You can open the C:\Temp folder using File Explorer or enter the following command in PowerShell to open it quickly: 

    Start-Process "C:\Temp" 
    

    User's image

    Explanation for this code: 

    • StorageUsageCurrent: This shows the current storage used in MB. 
    • StorageQuota: This is the total storage quota for the site. 
    • The -Limit All parameter ensures the command retrieves all site collections. 

    Run this script on a schedule and export the results to a CSV file each time (as shown in the optional step). By comparing the CSV files from different dates, you can track which sites are growing the fastest over time. 

    For your reference, here is the official Microsoft documentation for the Get-SPOSite cmdlet: Get-SPOSite (Microsoft.Online.SharePoint.PowerShell) | Microsoft Learn 

    This PowerShell method is the most direct and reliable way to build the custom report you described. I hope this provides a clear path forward for managing your storage. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. User's image


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.