Get-PnPView

Returns one or all views from a list

Syntax

Get-PnPView
   -List <ListPipeBind>
              [-Includes <String[]>]
              [-Identity <ViewPipeBind>]
              [-Web <WebPipeBind>]
              [-Connection <SPOnlineConnection>]

Examples

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

Get-PnPView -List "Demo List"

Returns all views associated from the specified list

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

Get-PnPView -List "Demo List" -Identity "Demo View"

Returns the view called "Demo View" from the specified list

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

Get-PnPView -List "Demo List" -Identity "5275148a-6c6c-43d8-999a-d2186989a661"

Returns the view with the specified ID from the specified list

Parameters

-Connection

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

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Identity

The ID or name of the view

Type:ViewPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Includes

Specify properties to include when retrieving objects from the server.

Type:String[]
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-List

The ID or Url of the list.

Type:ListPipeBind
Position:0
Accept pipeline input:True
Accept wildcard characters:False
-Web

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

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.SharePoint.Client.View