Share via


SharePoint Online SPOMod: Get-SPOList

This article describes a function of a custom SharePoint Online module available for download and installation on GitHub where it welcomes all your suggestions and contributions.

Get-SPOList

The cmdlet gets all the lists in a given site. In order to retrieve a specific list, use | Where (examples below).

Parameters

IncludeAllProperties  Optional  Switch. By default set to $false. If used, retrieves the properties of the lists, including workflows, views, versioning settings. 

 

Examples

----- EXAMPLE 1 ------

Get-SPOList

----- EXAMPLE 2 ------

Get-SPOList -IncludeAllProperties 

----- EXAMPLE 3 ------
Retrieve properties for one list.

Get-SPOList -IncludeAllProperties | where {$_.Title -eq "Documents"}

----- EXAMPLE 4 ------
Select all empty lists (library is also a list).

Get-SPOList -IncludeAllProperties | where {$_.ItemCount -eq 0} | select title, RootFolder.ServerRelativeUrl

----- EXAMPLE 5 ------
Check versioning settings for all lists.

Get-SPOList -IncludeAllProperties $true | select title, *version*

----- EXAMPLE 6 ------
Check the number of items for all lists.

Get-SPOList -IncludeAllProperties | select  title, itemcount

----- EXAMPLE 7 ------
Export the lists and their settings to a CSV file.

Get-SPOList -IncludeAllProperties | export-csv c:\testytoDelete.csv

----- EXAMPLE 8 ------
Get all document libraries.

Get-SPOList -IncludeAllProperties | where  {$_.BaseTemplate -eq 101} | select title

See Also

http://c.statcounter.com/10639504/0/5b1d8e80/0/