Get-SPOSite
Updated: November 6, 2012
Applies to: Office 365 | SharePoint Online
Returns one or more site collections.
Get-SPOSite [[-Identity] <SpoSitePipeBind>] [-Detailed <SwitchParameter>] [-Limit <String>]
Get-SPOSite [-Detailed <SwitchParameter>] [-Filter <String>] [-Limit <String>]
Parameters
1| Parameter | Required | Type | Description |
| Identity | Optional | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind | Specifies the URL of the site collection. |
| 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 |
| 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. |
| 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 | ||
| 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.
| ||
| 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. |
Detailed Description
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.
Note: |
|---|
| 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.
Input Types
Return Types
--------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.
Change History
| Date | Description |
|---|---|
| November 6, 2012 | Updated the operator values of the Filter parameter to be lowercase instead of uppercase. |
| July 16, 2012 | Initial publication |

Note: