Does this script work for clients who has unlimited storage in one drive?


  • How to set OneDrive for Business Storage Quota using PowerShell

    #Step1: Get values for input parameters 
    #Step2: Connect to SharePoint Online and MsolService 
    $credential = get-credential  
    Connect-SPOService -Url “” -Credential $credential  
    Connect-MsolService -Credential $credential 
    #Step3: Set OneDrive Storage Quota for all Office 365 Users  
    $users | Foreach-Object{  
    $username=($user.userprincipalname –Split “@”)[0] 
    $Dname=($Fulldomain -Split "\."
    If($Dname[2] -ne $null




    Set-SPOSite –Identity “$sitename” -StorageQuota $Quota 
    • Moved by Bill_Stewart Wednesday, June 8, 2016 12:57 PM Move to more appropriate forum
    Tuesday, June 7, 2016 11:27 PM

All replies

  • What exactly are you trying to do? It should work just fine for setting the quota to *some* value, if you want to limit it to something lower than the default 1TB. But the maximum value you can set depends on the current usage, you cannot just set it to say 5TB, you will only be able to do so once the usage is close to the limit.

    Wednesday, June 8, 2016 6:59 PM
  • If there is a customer who has unlimited storage (5TB) and wants to set a random quota i.e 3TB, does this script work?

    It's just in case they want to set different storage quotas for they users if they regret to have unlimited storage for certain users.

    I know the script works under 1tb, wondering if works with this new feature

    Wednesday, June 8, 2016 7:47 PM
  • Yes, it would work. You just need to respect the limits (1TB, 5TB, 10TB and so on) and you have gone over the minimum required storage for said "tier".
    Wednesday, June 8, 2016 9:03 PM