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

    Question

  • How to set OneDrive for Business Storage Quota using PowerShell

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

    $Firstname=$Dname[0] 
    $Secondname=$Dname[1] 
    $thirdname=$Dname[2] 
    $sitename"https://"+$Firstname+"-my.sharepoint.com/personal/"+$username+"_"+$Firstname+"_"+$Secondname+"_"+$thirdname 

    Else 

    $Firstname=$Dname[0] 
    $Secondname=$Dname[1] 
    $sitename"https://"+$Firstname+"-my.sharepoint.com/personal/"+$username+"_"+$Firstname+"_"+$Secondname  

    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