Manage site storage limits
The amount of Microsoft SharePoint space your organization has is based on your number of licenses (see SharePoint Limits). If you're a Global Administrator in Microsoft 365, you can Add storage space for your subscription if you run out.
View the total and available storage space for your organization
Go to Active sites in the SharePoint admin center, and sign in with an account that has admin permissions for your organization.
Note
If you have Office 365 operated by 21Vianet (China), sign in to the Microsoft 365 admin center, then browse to the SharePoint admin center and open the Active sites page.
In the upper right of the page, see the amount of storage available and the total storage for your subscription. (If your organization has configured Multi-Geo in Microsoft 365, you can point to the bar to see the amount of storage used in the current geo location and all other geo locations.)
Note
Storage usage doesn't include changes made within the last 24-48 hours.
Set automatic or manual site storage limits
By default, your SharePoint storage is available in a central pool from which all sites can draw. You, as a Global Administrator or SharePoint Administrator, don't need to divvy up storage space or reallocate space based on usage. That's all handled automatically: sites use what they need when they need it. If you previously set storage limits manually and switch to using pooled storage, SharePoint resets all the limits to 25 TB (25600 GB). (Note that the total storage for your organization might be less than 25 TB.)
If you prefer to fine-tune the storage space allocated to each site, you can set your storage management option to "manual" and specify individual site storage limits.
Note
Some functionality is introduced gradually to organizations that have opted in to the Targeted release option in Microsoft 365. This means that you might not yet see some features described in this article, or they might look different.
Go to Settings in the SharePoint admin center, and sign in with an account that has admin permissions for your organization.
Note
If you have Office 365 operated by 21Vianet (China), sign in to the Microsoft 365 admin center, then browse to the SharePoint admin center and open the Settings page.
Select Site storage limits.
Select Automatic or Manual, and then select Save.
Manage individual site storage limits
Follow these steps to specify individual site storage limits when your storage management option is set to "manual." We recommend that you also set an email alert so that you and other site admins can be notified when sites are nearing the storage limit. To learn how to set the default storage limit for new sites, see Manage site creation.
Go to Active sites in the SharePoint admin center, and sign in with an account that has admin permissions for your organization.
Note
If you have Office 365 operated by 21Vianet (China), sign in to the Microsoft 365 admin center, then browse to the SharePoint admin center and open the Active sites page.
In the left column, select the site, or for a channel site, select the link in the Channel sites column.
Select Storage on the command bar to open edit storage limit panel.
Enter the maximum storage in GB for the site.
Note
The max value you can enter is 25600 GB, although this may be more space than your organization has. To learn how your total storage is calculated, see SharePoint Limits.
If you set site storage limits in PowerShell, you enter them in MB. The values are converted and rounded down to the nearest integer to appear in GB in both the SharePoint admin center. So a value of 5000 MB becomes 4 GB. The minimum storage limit is 1 GB, so if you set a value of less than 1024 MB by using PowerShell, it will be rounded up to 1 GB.
Make sure Notifications is turned on to send an email to site admins when the site approaches the storage limit. Then, enter a value as a percent for how full you want the storage to be when the email is sent.
Select Save.
If a site runs out of storage, site admins can request more by following these steps:
- Go to the Site Settings page.
- Under Site Collection Administration, select Storage Metrics.
- Select Request more quota in the upper right.
This sends a storage request email to the Global Administrators in the organization.
Monitor site storage limits by using PowerShell
If you manage storage limits manually, you need to regularly monitor them to make sure they aren't affecting site performance. We recommend that you also set up your own alert emails to notify site admins before a site reaches the limit. The built-in storage quota warning emails are typically sent weekly for sites that have reached the specified warning level. So site admins often receive the storage quota warning email too late. For example, if the Disk Quota Warning timer job (which triggers the warning email) is scheduled weekly and sends the email warning every Sunday, but a site reaches the quota warning limit on Monday, the site admin doesn't receive the alert email for six days. This site could reach the maximum storage limit and be set to read-only before the site admin receives the alert email.
You can use the following Microsoft PowerShell script to monitor your sites. This script pulls the data, composes, and then sends a storage warning alerts to the site admin.
Download the latest SharePoint Online Management Shell.
Note
If you installed a previous version of the SharePoint Online Management Shell, go to Add or remove programs and uninstall "SharePoint Online Management Shell."
Connect to SharePoint as a Global Administrator or SharePoint Administrator in Microsoft 365. To learn how, see Getting started with SharePoint Online Management Shell.
Copy the following text with the variable declarations, and paste it into a text editor, such as Notepad. You must set all of the input values to be specific to your organization. Save the file, and then rename it "GetEmailWarning.ps1".
Note
You can use a different file name, but you must save the file as an ANSI-encoded text file with the extension .ps1.
#Connect to SharePoint admin center using an admin account #Specify the URL to your SharePoint admin center site, e.g. https://contoso-admin.sharepoint.com $url = 'https://contoso-admin.sharepoint.com' #Specify a folder path to output the results into $path = '.\' #SMTP details $Smtp = '<SmtpServer>' $From = '<SenderEmailAddress>' $To = '<RecipientEmailAddress>' $Subject = 'Site Storage Warning' $Body = 'Storage Usage Details' if($url -eq '') { $url = Read-Host -Prompt 'Enter the SharePoint admin center URL' } Connect-SPOService -Url $url #Local variable to create and store output file $filename = (Get-Date -Format o | foreach {$_ -Replace ":", ""})+'.csv' $fullpath = $path+$filename #Enumerating all sites and calculating storage usage $sites = Get-SPOSite $results = @() foreach ($site in $sites) { $siteStorage = New-Object PSObject $percent = $site.StorageUsageCurrent / $site.StorageQuota * 100 $percentage = [math]::Round($percent,2) $siteStorage | Add-Member -MemberType NoteProperty -Name "Site Title" -Value $site.Title $siteStorage | Add-Member -MemberType NoteProperty -Name "Site Url" -Value $site.Url $siteStorage | Add-Member -MemberType NoteProperty -Name "Percentage Used" -Value $percentage $siteStorage | Add-Member -MemberType NoteProperty -Name "Storage Used (MB)" -Value $site.StorageUsageCurrent $siteStorage | Add-Member -MemberType NoteProperty -Name "Storage Quota (MB)" -Value $site.StorageQuota $results += $siteStorage $siteStorage = $null } $results | Export-Csv -Path $fullpath -NoTypeInformation #Sending email with output file as attachment Send-MailMessage -SmtpServer $Smtp -To $To -From $From -Subject $Subject -Attachments $fullpath -Body $Body -Priority high
Where:
$url is the URL of your SharePoint admin center. If the
$url
variable is left empty, you will be prompted to enter the URL of your admin center site.$path is the file system path you want the CSV file to output to.
<SmtpServer> is the name of your mail server.
<SenderEmailAddress> is the Global Administrator or SharePoint Administrator account that appears in the From line in the warning email.
<RecipientEmailAddress> is the admin account that will receive the email warning.
In SharePoint Online Management Shell, change to the local directory where you saved the script file.
./GetEmailWarning.ps1
After the script successfully completes, a text file is created in the location that you specified in the $path variable in the script.
Note
If you get an error message about being unable to run scripts, you might need to change your execution policies. For info, see About Execution Policies.
Feedback
Indsend og få vist feedback om