Commands › SharePoint Online

Get-SPOSite

SharePoint Online Microsoft.Online.SharePoint.PowerShell Get-*

Returns one or more site collections.

Quick start script

# Get-SPOSite — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Get-SPOSite | Format-List

# 3. Export for evidence / drift tracking
Get-SPOSite | Export-Clixml .\SPOSite-$(Get-Date -Format yyyyMMdd).xml

Syntax — 3 parameter sets

ParamSet1 (Default)

Get-SPOSite [[-Identity] <SpoSitePipeBind>] [-Limit <String>] [-Detailed] [-IsAuthoritative <Boolean>] [<CommonParameters>]

ParamSet3

Get-SPOSite [-Identity] <SpoSitePipeBind> [-DisableSharingForNonOwnersStatus] [<CommonParameters>]

ParamSet2

Get-SPOSite [-Filter <String>] [-Limit <String>] [-Detailed] [-Template <String>]
 [-IncludePersonalSite <Boolean>] [-GroupIdDefined <Boolean>] [-ArchiveStatus <ArchiveStatusFilterType>]
 [<CommonParameters>]

Parameters (10)

ParameterTypeRequiredWhat it controls
-ArchiveStatus ArchiveStatusFilterType Displays sites of a specific archive status. For example, NotArchived, RecentlyArchived, FullyArchived, Archived, or Reactivating.
-Detailed SwitchParameter Use this parameter to get additional property information on a site collection. You will notice a slower response time when the Detailed parameter is used.
-DisableSharingForNonOwnersStatus SwitchParameter This parameter prevents non-owners from sharing.
-Filter String Specifies the script block of the server-side filter to apply. The type must be a valid filter name and value must be in the form `{ PropertyName <operator> "filterValue"}`. Valid operators are as follows: -eq, -ne,...
-GroupIdDefined Boolean Filters the list of sites returned to sites with a Group ID (ie: Sites connected to an Microsoft 365 Group) when the value is set to $true. Filters the list of sites to only sites without a Group ID when the value is $false.
-Identity SpoSitePipeBind Specifies the URL of the site collection.
-IncludePersonalSite Boolean Displays personal sites when value is set to $true.
-IsAuthoritative Boolean Filter the list of sites where the IsAuthoritative property is set to true. When IsAuthoritative is true, it signals to Microsoft Search, Copilot (BizChat), and other AI agents that the site's content is official,...
-Limit String Specifies the maximum number of site collections to return. It can be any number. To retrieve all site collections, use ALL. The default value is 200. If this parameter is provided, then some site collection...
-Template String Displays sites of a specific template. For example, STS, STS#0, STS#1, STS#3, GROUP#0, SRCHCEN#0 or SITEPAGEPUBLISHING#0.

Message Center changes mentioning this command

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.