Commands › SharePoint Online

Get-SPOContainer

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

Returns one or more containers in a SharePoint Embedded application.

Quick start script

# Get-SPOContainer — 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-SPOContainer -ArchiveStatus <SPContainerArchiveStatusFilterProperties> -Identity <SPOContainerPipeBind> -OwningApplicationId <Guid> | Format-List

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

Syntax — 5 parameter sets

All (Default)

Get-SPOContainer [-Identity <SPOContainerPipeBind>] [-Paged] [[-PagingToken] <String>]
 [[-SortByStorage] <SortOrder>] [[-ArchiveStatus] <SPContainerArchiveStatusFilterProperties>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

OwningApplicationId

Get-SPOContainer [-OwningApplicationId] <Guid> [-Paged] [[-PagingToken] <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Sort

Get-SPOContainer [-OwningApplicationId] <Guid> [-Paged] [[-PagingToken] <String>] [-SortByStorage] <SortOrder>
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Archive

Get-SPOContainer [-OwningApplicationId] <Guid> [-Paged] [[-PagingToken] <String>]
 [[-SortByStorage] <SortOrder>] [-ArchiveStatus] <SPContainerArchiveStatusFilterProperties>
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

1 more parameter sets — see the parameter table below.

Parameters (6)

ParameterTypeRequiredWhat it controls
-ArchiveStatus SPContainerArchiveStatusFilterProperties yes The ArchiveStatus parameter is used to display containers in various stages of archiving. The following states are supported:
-Identity SPOContainerPipeBind yes Use this parameter to specify the Container ID.
-OwningApplicationId Guid yes This parameter specifies the ID of the SharePoint Embedded application. Use the `Get-SPOApplication` command to retrieve the OwningApplicationId.
-Paged SwitchParameter This parameter can be used when there are more than 200 containers in a given SharePoint Embedded application. Using `-Paged` will provide a paging token that will display the next 200 Containers.
-PagingToken String Use this parameter to provide the paging token to view the remaining containers as shown in Example 4. If there are no more containers to display, the cmdlet output will return the message `End of containers view.`...
-SortByStorage SortOrder yes This parameter can be used when you need to see the list of containers, sorted by storage.

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