Get-SPOSite

 

Applies to: Office 365, SharePoint Online

Topic Last Modified: 2016-10-05

Returns one or more site collections.

Get-SPOSite [-Detailed <SwitchParameter>] [-Identity <SpoSitePipeBind>] [-Limit <String>] <COMMON PARAMETERS>

Get-SPOSite -Identity <SpoSitePipeBind> [-DisableSharingForNonOwnersStatus <SwitchParameter>] <COMMON PARAMETERS>

Get-SPOSite [-Detailed <SwitchParameter>] [-Filter <String>] [-IncludePersonalSite <$true | $false>] [-Limit <String>] [-Template <String>] <COMMON PARAMETERS>

COMMON PARAMETERS:

--------Example 1--------

Get-SPOSite

Example 1 returns all site collections.

--------Example 2--------

Get-SPOSite -Identity https://contoso.sharepoint.com 

Example 2 lists the site collection with detailed properties.

--------Example 3--------

Get-SpoSite -Identity https://contoso.sharepoint.com -DisableSharingForNonOwnersStatus

Example 3 disables the ability for non owners of a site collection to share.

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.

The Get-SPOSite cmdlet retrieves and returns properties of all site collections that match the given criteria.

With version 5361 of the SharePoint Online Management Shell, you may experience the following:

  • Additional site collections are now displayed. For example, all group and video sites along with team sites will be displayed.

  • The Detailed parameter has been deprecated. It will continue to work with earlier versions

  • You may see an impact on performance when the Filter parameter is used.

NoteNote:
Site collections in the Recycle Bin will not be retrieved by using the Get-SPOSite cmdlet.

You need to be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.

SharePoint Online Management Shell

 

Parameter Required Type Description

Detailed

Optional

System.Management.Automation.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.

The following properties are returned:

--ResourceUsageCurrent

--ResourceUsageAverage

--StorageUsageCurrent

--LockIssue

--WebsCount

--CompatibilityLevel

--AllowSelfServiceUpgrade

DisableSharingForNonOwnersStatus

Optional

System.Management.Automation.SwitchParameter

This parameter prevents non-owners from sharing.

NoteNote:
This parameter is available only in SharePoint Online Management Shell Version 16.0.4613.1211 or later.

Filter

Optional

System.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, like, notlike.

NoteNote:
The operator values are case-sensitive.

Identity

Optional

Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind

Specifies the URL of the site collection.

IncludePersonalSite

Optional

System.Boolean

Displays personal sites when value is set to $true.

The values are $true and $false. By default, the value is $false which means no personal sites will be returned.

Limit

Optional

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

Template

Optional

System.String

Displays sites of a specific template. For example, STS, STS#0 or STS#1.

Show: