Setting storage quotas in OneDrive for Business

By |2017-12-11T09:18:08+00:00October 16th, 2015|Office 365|0 Comments

OneDrive for Business comes with 1TB of personal storage for every user, by default – but some organisations may have reasons to restrict the available storage. That capability was recently added, using the Set-SPOSite PowerShell command but I  came across a “gotcha” that even had Microsoft stumped for a while.

I found that I could use Get-SPOSite -Identity to view the properties of a users’ OneDrive for Business site, but attempting to set the quota on the same site presented an error:

Set-SPOSite -Identity -StorageQuota 2048

Set-SPOSite : Cannot get site
At line:1 char:1
+ Set-SPOSite -Identity …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-SPOSite], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetSite

he problem was that Site Collection Storage Management in SharePoint Online was set to Automatic. Once this was changed to Manual, I could successfully apply the quotas to users’ OneDrive for Business sites.


As well as using PowerShell (Get-SPOSite -Identity, you can check the current storage quota in the browser, under Site settings, Storage Metrics:


Unfortunately this setting has to be applied on a per-user basis, after the user has already logged on to OneDrive for Business (which provisions the storage).  There are a couple of scripts in the posh-o365 script collection that can help with this: Check-ODBQuotas.ps1 and Set-ODBQuota.ps1.

[This is an edited version of a post that was originally published at]

Leave A Comment

like what you see? 

Sign-up to our newsletter and never miss out on the latest blogs, events and tech news from the world of risual
Give it a try, you can unsubscribe anytime.