Manage site storage limits

The amount of SharePoint Online space your organization has is based on your number of users (see SharePoint Online Limits). If you're a global admin in Office 365, you can Change storage space for your subscription if you run out.

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 or SharePoint admin, 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, up to a maximum of 25 terabytes (TB) per site (previously called "site collection"). If you previously set storage limits manually and switch to using pooled storage, SharePoint resets all the limits to 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.

  1. Sign in to https://admin.microsoft.com as a global or SharePoint admin. (If you see a message that you don't have permission to access the page, you don't have Office 365 administrator permissions in your organization.)

    Note

    If you have Office 365 Germany, sign in at https://portal.office.de. If you have Office 365 operated by 21Vianet (China), sign in at https://login.partner.microsoftonline.cn/. Then select the Admin tile to open the admin center.

  2. In the left pane, under Admin centers, select SharePoint. If this opens the classic SharePoint admin center, select Try it now to open the new SharePoint admin center.

  3. In the left pane of the new SharePoint admin center, select Settings.

  4. Select Site storage limits.

Managing site storage limits

  1. 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.

  1. Sign in to https://admin.microsoft.com as a global or SharePoint admin. (If you see a message that you don't have permission to access the page, you don't have Office 365 administrator permissions in your organization.)

    Note

    If you have Office 365 Germany, sign in at https://portal.office.de. If you have Office 365 operated by 21Vianet (China), sign in at https://login.partner.microsoftonline.cn/. Then select the Admin tile to open the admin center.

  2. In the left pane, under Admin centers, select SharePoint. (You might need to select Show all to see the list of admin centers.) If this opens the classic SharePoint admin center, select Try it now to open the new SharePoint admin center.

  3. On the Active sites page of the new SharePoint admin center, select a site and then select Storage.

Changing the storage limit for a site

  1. 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 see how much space comes with your subscription, see SharePoint Online 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 new and classic SharePoint admin centers. 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.

  1. 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.

  2. Select Save.

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 6 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.

  1. Download the latest SharePoint Online Management Shell.

  2. Connect to SharePoint Online as a global admin or SharePoint admin in Office 365. To learn how, see Getting started with SharePoint Online Management Shell.

  3. 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 admin account  $username = "<global or SharePoint admin account>"  $password = ConvertTo-SecureString "<Password>" -AsPlainText -Force  $cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)  Connect-SPOService -Url <SharePoint admin center URL> -Credential $cred  #Local variable to create and store output file  $filename = Get-Date -Format o | foreach {$_ -replace ":", ""}  $result = "<Local folder path>"+$filename+".txt"  #SMTP and Inbox details  $smtp = "<smtpserver>"  $from = "<sender email>"  $to = "<recipient email>"  $subject = "Site storage warning"  $body = "Storage usage details"  #Enumerating all sites and calculating storage usage  $sites = Get-SPOSite -detailed  foreach ($site in $sites)  {  $percent = $site.StorageUsageCurrent / $site.StorageQuota * 100  $percentage = [math]::Round($percent,2)  Write-Output "$percentage %         $($site.StorageUsageCurrent)kb of $($site.StorageQuota)kb        $($site.url)" | Out-File $result -Append  }  #Sending email with output file as attachment  sleep 5  Send-MailMessage -SmtpServer $smtp -to $to -from $from -subject $subject -Attachments $result -body $body -Priority high
  1. Where:
  • <global or SharePoint admin account> is the username for the account that has the global admin or SharePoint admin role in Office 365.

  • <password> is the password for the global or SharePoint admin account.

  • <SharePoint admin center URL> is the URL for your SharePoint admin center.

  • <local folder path> is the local path for the folder where you want the data saved.

  • <smtpserver> is the name of your SMTP mail server.

  • <sender email> is the global admin or SharePoint admin account that appears in the From line in the warning email.

  • <recipient email> is the admin account that will receive the email warning.

  1. 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 <Local folder 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.

See also

SharePoint Online limits