OneDrive is Microsoft’s cloud service that provides personal storage space for your files. For most Microsoft 365 subscription plans, each user’s OneDrive comes with 1 TB of storage by default, with an option to increase it to 5 TB, depending on the subscription.
If users in your organization are actively storing data in OneDrive, they may want to monitor their current storage usage. Exceeding the storage limit can lead to error messages and restrictions on additional data storage. To ensure sufficient space for your data and future needs, it’s a good practice to regularly monitor your OneDrive usage.
Contents
Check OneDrive Storage Usage as a Standard User
As a standard user without any administrator permissions, you can check OneDrive storage usage by following below steps:
- Sign in to the Microsoft365.com.
- Click on the square dots in the left-hand corner to reveal all Microsoft 365 Apps.
- On the top right-hand side, you will find a Settings icon. Click on it and then click on OneDrive settings.
- Click on More settings > Storage Metrics.
- The Storage Metrics page will show you how much storage is being consumed by a user. Since documents are stored in the Document Library, look for the Documents folder in the OneDrive site collection to find out how much space is being used.
- You can also check from the top right-hand corner to see how much space has been used. In the below screenshot, it shows 1024.00 GB free out of 1024.00 GB. There is a negligible amount of space consumed, and it mostly does not contain any data. Your displayed value may vary depending on your usage.
Check OneDrive Storage Usage as an Administrator
If you are a Global admin or SharePoint admin in your organization, you can find out the OneDrive usage in your organization either using Microsoft 365 admin center or by using PowerShell. Let’s check the steps:
Using Microsoft 365 Admin Center
- Sign in to the Microsoft 365 admin center > Users > Active Users.
- Click on any user to open a pane on the right-hand side.
- Navigate to the OneDrive tab to check the Storage used.
Export OneDrive Storage Usage Report of All Users
You can also export a report which shows OneDrive storage usage for all users in your organization:
- Sign in to the Microsoft 365 admin center > Reports > Usage.
- Click on OneDrive on left-hand side menu and Under Usage tab, Click on Export to export the list of users with OneDrive Storage information in a CSV file.
Check OneDrive Storage Usage using PowerShell
You can also check OneDrive Storage usage using PowerShell. It is quicker than using Microsoft 365 admin center. Let’s check the steps:
- Install SharePoint Online PowerShell Module.
- Copy the SharePoint Online Admin URL.
- Connect to Sharepoint Online
There are two ways to connect to SharePoint Online. The first one is to use the Connect-SPOService
cmdlet, and the second one is to use the Connect-PnPOnline
cmdlet. We will be utilizing the Connect-SPOService
cmdlet. If you want to learn about both these methods in more detail, please refer to the blog post: Connect to SharePoint Online Using PowerShell.
Connect to Sharepoint Online
Connect-SPOService -url <sharepoint site admin URL>
Example:
Connect-SPOService -url https://mylab000-admin.sharepoint.com
- Get OneDrive Site URL for the user account. To get the list of users with their OneDrive URLs, you can use below Microsoft provided script from the link: OneDrive URLs.
Get users OneDrive URL
$TenantUrl = Read-Host "Enter the SharePoint admin center URL"
$LogFile = [Environment]::GetFolderPath("Desktop") + "\OneDriveSites.log"
Connect-SPOService -Url $TenantUrl
Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like '-my.sharepoint.com/personal/'" | Select -ExpandProperty Url | Out-File $LogFile -Force
Write-Host "Done! File saved as $($LogFile)."
Output:
Get Users OneDrive space usage
Get-SPOSite -Identity https://mylab000-my.sharepoint.com/personal/meganb_techpress_net | select Owner, @{Label='StorageUsage';E={($_.StorageUsageCurrent/1024)}}, @{Label='StorageQuota';E={($_.StorageQuota/1024)}}, Status, @{label='FreeSpace%';expression={($_.StorageUsageCurrent / $_.StorageQuota)*100}} | ft -AutoSize
Export OneDrive Storage Usage Report for All Users Using PowerShell
- Ensure that SharePoint Online PowerShell module is installed and imported on your device (refer to previous section for Installation steps).
Connect to SharePoint Online
Connect-SPOService -url <sharepoint site admin URL>
Example:
Connect-SPOService -url https://techpress-admin.sharepoint.com
OneDrive_Storage_Usage_All_Users.ps1
# Get all OneDrive sites for users in your tenant
$oneDriveSites = Get-SPOSite -IncludePersonalSite $true -Filter "Url -like '-my.sharepoint.com/personal/'"
$oneDriveSites | ForEach-Object {
$_ | Select-Object `
Owner,
@{Label = 'StorageUsage (GB)'; Expression = { ($_.StorageUsageCurrent / 1024) } },
@{Label = 'StorageQuota (GB)'; Expression = { ($_.StorageQuota / 1024) } },
Status,
@{Label = 'FreeSpace (%)'; Expression = { [math]::Round((1 - ($_.StorageUsageCurrent / $_.StorageQuota)) * 100, 2) } }
} | Format-Table -AutoSize
- To Export the OneDrive Storage usage for all users in a CSV file, You can use below PowerShell script.
OneDrive_Storage_Usage_All_Users_CSV.ps1
# Get all OneDrive sites for users in your tenant
$oneDriveSites = Get-SPOSite -IncludePersonalSite $true -Filter "Url -like '-my.sharepoint.com/personal/'"
$oneDriveSites | ForEach-Object {
$_ | Select-Object `
Owner,
@{Label = 'StorageUsage (GB)'; Expression = { ($_.StorageUsageCurrent / 1024) } },
@{Label = 'StorageQuota (GB)'; Expression = { ($_.StorageQuota / 1024) } },
Status,
@{Label = 'FreeSpace (%)'; Expression = { [math]::Round((1 - ($_.StorageUsageCurrent / $_.StorageQuota)) * 100, 2) } }
} |
Export-Csv -Path "c:\temp\OneDriveStorageUsage.csv" -NoTypeInformation
Write-Host "Exported to OneDriveStorageUsage.csv"