OneDrive for Business: How to Increase Storage Quota for a User?

Requirement: Increase OneDrive for Business Storage Quota using PowerShell.

How to Increase OneDrive for Business Storage for One User?
The storage quota allocated to each user's OneDrive for Business site depends on your Microsoft 365 subscription plan. Say for e.g. if you have plans like "Office 365 Enterprise E3", your licensed users will get 1TB as the default storage quota. You can set the default storage quota to OneDrive for Business sites up to 5TB as in my other article How to change the default OneDrive for business storage quota settings?

Increase OneDrive for Business Storage for One User
As for increasing OneDrive for business storage for one user, you can use this PowerShell.
Make sure you have the SharePoint Online PowerShell module installed before running these scripts.
Install-Module -Name Microsoft.Online.SharePoint.PowerShell

Use "Set-SPOSite" PowerShell cmdlet with the "StorageQuota" parameter by giving the value in megabytes. The quota you specify can be either lesser or greater than the tenant default limit.

E.g. Set-SPOSite <OneDrive-Site-URL> -StorageQuota <Size in MB>

Change Onedrive Quota in SharePoint Online using PowerShell
To increase OneDrive for business storage for one specific user, use this PowerShell script. Just set the parameters for Tenant Admin and OneDrive site URL of the user and run the script as SharePoint Online administrator or global admin.
$TenantAdminURL = ""
$OneDriveSiteURL = ""

#Connect to Admin Center
Connect-SPOService -Url $TenantAdminURL -Credential (Get-Credential)

#Increase OneDrive site storage space
Set-SPOSite -Identity $OneDriveSiteURL -StorageQuota 2097152 #2TB

Reset OneDrive for Business Storage Quota to the Tenant Default
Alternatively, you can reset storage quota to the tenant default using PowerShell.
Set-SPOSite -Identity "" -StorageQuotaReset 

Set OneDrive for Business Storage for All Users using PowerShell
To change storage quota for all OneDrive for Business sites, use this PowerShell.
$TenantAdminURL = ""
$StorageLimit = 5242880 #5TB in MB

#Connect to SharePoint Online Admin Center
Connect-SPOService -Url $TenantAdminURL -Credential (Get-Credential)

#Get All OneDrive for Business Sites in the Tenant
$OneDriveSites = Get-SPOSite -Limit ALL -includepersonalsite $True -Filter "Url -like ''"

#Loop through each OneDrive Site and increase storage space
Foreach($Site in $OneDriveSites)
    #Increase storage limit
    Set-SPOSite -Identity $Site.URL -StorageQuota $StorageLimit
    Write-Host "Changed Storage Quota for site $($Site.URL) from $($Site.StorageQuota) to $StorageLimit"
To check the available storage on OneDrive for Business site, use: How to check onedrive for business storage size?

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.