Set OneDrive for Business Storage Quotas

Should OneDrive For Business Storage Growth Be Managed?

By default OneDrive for Business comes with an allocaiton of 1TB of storage. If your organisation meets the necessary criteria the default storage is 5TB and can be increased further should you require. Whilst having large amounts of storage available to the users in your organisation may be desirable, you may also find it a liability.

As users upload more and more files to their OneDrive for Business that could potenitally increase the resources you need to manage and maintain files in cases where a user leaves your organisation. More storage could increase the likelihood of files being put in OneDrive for Business that should not be put there - perhaps sensitive business files. It may also mean that computers with smaller disk sizes cannot sync all their data in OneDrive for Business.

Whatever the reason may be, there is legitimate cause to restrict the amount of storage your users have available for their files in OneDrive for Business. Fortunately, through the use of PowerShell cmdlets, you can set the storage quota for OneDrive for Business.

There are two relevant PowerShell cmdlets. Set-SPOSite will set the storage quota for a given user's OneDrive for Business. Set-SPOTenant sets the storage quota for the OneDrive for Business of new users that are added to your Office 365 tenant.

Here's An Approach For Managing Storage Growth

Using the two PowerShell cmdlets Set-SPOSite and Set-SPOTenant you can take control over the growth in storage of OneDrive for Business. Storage growth can now be based on justified and discrete business and end user needs rather than a case of "well, the storage was there so I decided to use it all" which can lead to uncontrolled and adhoc growth in storage and a potentially unquantified impact on your organisation.

First, you will need to set the initial storage quota applied to OneDrive for Business for all new users that are added to your Office 365 tenant with the Set-SPOTenant cmdlet. This ensures that all new OneDrive for Business storage is set to a known starting point. For example this could be set to 5GB.

As users consume their available storage allocation in OneDrive for Business they can make a request for more storage based on a justifiable need. You can then evaluate the request and make a determination on the storage increase. If you agree to the storage increase you can then set the new storage quota using the PowerShell cmdlet Set-SPOSite. You may want to increase the storage quota in set units of 5GB. Should a user consume the new storage allocation they can make another request for more.

So there's the approach, but how do you use those PowerShell cmdlets? Read on and follow the steps below to set up your environment for PowerShell and to learn how to run the two PowerShell cmdlets to set the storage quota.

Setting Up Your Environment For PowerShell

Before you can use PowerShell you will need to setup your computer to us the SharePoint Online PowerShell environment. This involves the following steps:

  1. Install Windows PowerShell 3.0
  2. Install the SharePoint Online Management Shell
  3. Open up a PowerShell session by clicking the Start button then typing SharePoint Online Management Shell followed by the return key. If you receive an error that a PowerShell module failed to load then try running the SharePoint Online Management Shell as an administrator
  4. Connect to SharePoint Online by running the Connect-SPOService cmdlet in the PowerShell session you have just started. In the following example replace thinkscape1com and admin@thinkscape.com with your Office 365 tenant name and Office 365 administrator user respectively: Connect-SPOService -Url https://thinkscape1com-admin.sharepoint.com -credential admin@thinkscape.com

After successfully working through the above steps you are now ready to use PowerShell!

Running The PowerShell Cmdlets

To set the storage quota for OneDrive for Business for new users added to your Office 365 tenant use Set-SPOTenant as follows:

Set-SPOTenant -OneDriveStorageQuota 5120

Where 5120 is the maximum storage size available specified in megabytes for all new OneDrive for Business personal sites. In the example above 5120 would translate to 5GB. A value of 1048576 would equal 1TB, 5242880 would equal 5TB. Values greater than the maximum permitted by a user's licence will be rounded down to the maximum allowed.

  • After running the above cmdlet new OneDrive for Business personal sites will show available storage as 5GB.
  • Screenshot

To set the storage quota for a specific user's OneDrive for Business use the PowerShell cmdlet Set-SPOSite. You need to specify the user's OneDrive for Business site URL and the storage quota to set it to:

Set-SPOSite -Identity "https://thinkscape1com-my.sharepoint.com/personal/testuser_thinkscape_com" -StorageQuota 10240

In the above example relace thinkscape1com and testuser_thinkscape_com with your Office 365 tenant name and the target user respectively. You can see the format of this URL by navigating to your OneDrive for Business in the browser and viewing the browser address bar. In the example provided the quota is set to 10,240 which is a value specified in megabytes. 10,240 megabytes is the equivalent of 10GB.

  • After running the above cmdlet and then checking the storage management page in OneDrive for Business you see the new setting has taken effect.
  • Screenshot

Related Articles

Setup OneDrive for Business Sites Programmatically

This article was last updated on 29th July 2016.

Map Drives with Zee Drive

If you are used to working with your files through Windows File Explorer and mapped network drives then Zee Drive will help ease your transition to Office 365.

Zee Drive maps OneDrive for Business and SharePoint Online document libraries to network drives so you can work with your files in Office 365 in a similar to your on-premises file server. End user training is greatly reduced due to the familiar way of working with files.

Find out more about Zee Drive here and download a free trial.

  • Zee Drive can map network drives to OneDrive for Business and team site libraries.
  • File Explorer

Migrate Files with Files To Go

Migrate your local file server to OneDrive for Business and SharePoint Online with our dedicated file migration tool Files To Go.

When you have thousands of files and gigabytes of data to migrate, Files To Go will make your migration to Office 365 smoother and faster. A subscription of Files To Go starts from only $195.00 USD.

Find out more about Files To Go here and download a free trial.

  • Fixes blocked file names
  • Full migration audit trail
  • Incremental file copies
  • Preserves file dates
  • Migrates files in parallel