SharePoint site inventory
Documentation: Microsoft Learn
Inventory SharePoint Online site collections with Get-SPOSite -Limit All and inspect the returned site properties.
The script
Script reader
Inspect before you run
Inspect the script below. It does not run in this browser.
Inspection only — no command has run.
Show reference output
Inspect this example’s structure
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Get-SPOSite -Limit All | Select-Object Url,Owner,StorageQuota,StorageUsageCurrent,Status- Stage 1Get-SPOSite
-Limit - Stage 2Select-Object
Positional values or no named parameters
How it works
Inventory SharePoint Online site collections with Get-SPOSite -Limit All and inspect the returned site properties. The projection keeps the URL with the owner, the configured StorageQuota, the current StorageUsageCurrent figure, and the site status.
Adapting it
Add -IncludePersonalSite $true to pull OneDrive sites into the report, which is normally where the unexpected consumption turns out to live.
Requirements
SharePoint Online module with Connect-SPOService and SharePoint administrator rights.
If the result is unexpected
The SharePoint site list is missing sites or contains the wrong tenant.
The administrative endpoint and query options determine the inventory scope.
- Confirm the tenant admin URL and inspect a known site before comparing the list.
Validate the result
The result identifies the intended tenant and the site categories included.
Keep the check reliable
Document whether personal sites and other special site types are in scope.