Fix Set-SPOSite OneDrive Storage Quota Errors
Question details
The user needs to resolve errors when increasing a OneDrive for Business user's storage quota with Set-SPOSite.
- Product
- OneDrive for Business and SharePoint Online Management Shell
- Device & OS
- not provided
- Scenario
- A Microsoft 365 administrator is changing an individual user's OneDrive storage quota with PowerShell.
- Observed behavior
- Set-SPOSite returns an error when the administrator attempts to increase the quota.
Identify the user's OneDrive site URL and your SharePoint admin center URL. Sign in with an account authorized to manage SharePoint Online, and check that the requested quota is allowed by the user's license.
Reinstall the SharePoint Online Management Shell and retry the quota change
Use this approach when an older SharePoint Online Management Shell installation may be conflicting with the current module.
Open Windows Settings > Apps > Apps & features or Installed apps. Find and uninstall any SharePoint Online Management Shell installations, then close PowerShell windows.
Open PowerShell and run Get-Module -ListAvailable Microsoft.Online.SharePoint.PowerShell. If older PowerShell-installed copies remain, review their versions and locations before removing the conflicting copies.
Open PowerShell as administrator and run Install-Module -Name Microsoft.Online.SharePoint.PowerShell. Follow any prompts to install the required provider or trust the repository.
In a new PowerShell window, run Connect-SPOService -Url https://yourtenant-admin.sharepoint.com, replacing the URL with your SharePoint admin center URL. Sign in when prompted.
Run Set-SPOSite -Identity "<OneDrive site URL>" -StorageQuota <quota in MB>, replacing the placeholders with the user's OneDrive URL and an allowed quota in megabytes. Then run Get-SPOSite -Identity "<OneDrive site URL>" | Select-Object Url, StorageQuota to check the result.
Edit OneDrive Office files with WPS Office
WPS Office is a free, lightweight alternative with a familiar interface and compatibility with Microsoft Office formats. Download files from OneDrive to edit them in WPS, then upload the changes. WPS does not fix SharePoint Online quota errors.

Frequently Asked Questions
Why can an older SharePoint module cause a Set-SPOSite error?
An older SharePoint Online Management Shell installation can conflict with the current module. Check Windows Settings > Apps and run Get-Module -ListAvailable Microsoft.Online.SharePoint.PowerShell to identify installed copies.
Which URL should I use with Set-SPOSite?
Use the individual user's OneDrive site URL with the -Identity parameter. Use the SharePoint admin center URL separately when connecting with Connect-SPOService.
What unit does the StorageQuota parameter use?
The Set-SPOSite -StorageQuota value is specified in megabytes. Enter a numeric value that is permitted for the user's license and Microsoft 365 configuration.
How can I check the quota after running the command?
Run Get-SPOSite -Identity "<OneDrive site URL>" | Select-Object Url, StorageQuota, replacing the placeholder with the user's OneDrive site URL.




