Skip to main content
Get List
Updated this week

Name

Get-List

Description

The command to get lists or libraries from a SharePoint site.

Examples

Get All Lists

$site = Connect-Site -Url "http://myfarm1/sites/mysitecollection"
Get-List -Site $site

Get Lists Matching Name

$site = Connect-Site -Url "http://myfarm1/sites/mysitecollection"
Get-List -Site $site -Name MyName*,MySpecificName

Note: The * symbol is used to call multiple objects with a similar name.

Get Lists Matching Id

$site = Connect-Site -Url "http://myfarm1/sites/mysitecollection"
Get-List -Site $site -Id 1ca5588e-1283-41fa-b3df-511b39f28756

Syntax

Get-List 
[-Site] <Site>[[-Name] <String[]>][[-Id] <String[]>]

Parameters

-Id <String[]>

Specifies the id (Wildcards supported).

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

True

Parameter set name

(All)

Aliases

None

-Name <String[]>

Specifies the name (Wildcards supported).

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

True

Parameter set name

(All)

Aliases

None

-Site <Site>

Specifies the SharePoint site.

Required?

True

Default value

None

Accept pipeline input?

True (ByValue, ByPropertyName)

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

Did this answer your question?