Skip to content

Latest commit

 

History

History
113 lines (83 loc) · 2.26 KB

Get-PnPList.md

File metadata and controls

113 lines (83 loc) · 2.26 KB
external help file applicable schema
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online
2.0.0

Get-PnPList

SYNOPSIS

Returns a List object

SYNTAX

Get-PnPList [-ThrowExceptionIfListNotFound [<SwitchParameter>]]
            [-Web <WebPipeBind>]
            [-Includes <String[]>]
            [-Identity <ListPipeBind>]
            [-Connection <SPOnlineConnection>]

EXAMPLES

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

PS:> Get-PnPList

Returns all lists in the current web

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

PS:> Get-PnPList -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

Returns a list with the given id.

------------------EXAMPLE 3------------------

PS:> Get-PnPList -Identity Lists/Announcements

Returns a list with the given url.

PARAMETERS

-Identity

The ID, name or Url (Lists/MyList) of the list.

Type: ListPipeBind
Parameter Sets: (All)

Required: False
Position: 0
Accept pipeline input: True

-Includes

Specify properties to include when retrieving objects from the server.

Type: String[]
Parameter Sets: 

Required: False
Position: 0
Accept pipeline input: False

-ThrowExceptionIfListNotFound

Switch parameter if an exception should be thrown if the requested list does not exist (true) or if omitted, nothing will be returned in case the list does not exist

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Web

The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Connection

Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

OUTPUTS

RELATED LINKS

SharePoint Developer Patterns and Practices