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?

How to Increase OneDrive for Business Storage per User?
To change OneDrive for business storage limit for one user, do the following:
  • Login to Microsoft 365 Admin Center at https://admin.microsoft.com
  • Expand "Users" >> Active users >> Search and Find the user account you want to increase OneDrive for Business storage space.
  • Click on the user name to open user properties >> Select OneDrive tab.
  • In OneDrive tab, Click on "Edit" button next to "Storage used". This lets you to enter new storage space allocation for the particular user.
    increase onedrive for business storage for one user
  • Set the "Maximum storage for this User" and hit save button to set new storage allocation for the particular user's OneDrive.
    change onedrive for business storage allocation per user

Increase OneDrive for Business Storage for One User using PowerShell
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.
#Parameters
$TenantAdminURL = "https://crescent-admin.sharepoint.com"
$OneDriveSiteURL = "https://crescent-my.sharepoint.com/personal/Salaudeen_crescent_com"

#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 "https://crescent-my.sharepoint.com/personal/salaudeen_crescent_com" -StorageQuotaReset 

PnP PowerShell to Set OneDrive for Business Site Storage Quota for a User
To change the storage quota for a particular user, use this PnP PowerShell
#Parameters
$TenantAdminURL= "https://crescent-admin.sharepoint.com"
$UserID = "[email protected]"
$StorageQuota = 2199023255552 #2TB in Bytes
$WarningQuota = 1979120929996 #1.8 TB

#Connect to the Tenant Admin
Connect-PnPOnline -Url $TenantAdminURL -UseWebLogin

#Set Storage Quota for the user
Set-PnPUserOneDriveQuota -Account $UserID -Quota $StorageQuota -QuotaWarning $WarningQuota

Set OneDrive for Business Storage for All Users using PowerShell
To change storage quota for all OneDrive for Business sites, use this PowerShell.
#Parameters
$TenantAdminURL = "https://crescent-admin.sharepoint.com"
$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 '-my.sharepoint.com/personal/'"

#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.