Get-PnPProperty

Returns a previously not loaded property of a ClientObject

Syntax

Get-PnPProperty
   -ClientObject <ClientObject>
                  -Property <String[]>
                  [-Connection <SPOnlineConnection>]

Description

Will populate properties of an object and optionally, if needed, load the value from the server. If one property is specified its value will be returned to the output.

Examples

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

$web = Get-PnPWeb
Get-PnPProperty -ClientObject $web -Property Id, Lists
$web.Lists

Will load both the Id and Lists properties of the specified Web object.

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

$list = Get-PnPList -Identity 'Site Assets'
Get-PnPProperty -ClientObject $list -Property Views

Will load the views object of the specified list object and return its value to the output.

Parameters

-ClientObject

Specifies the object where the properties of should be retrieved

Type:ClientObject
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-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
-Property

The properties to load. If one property is specified its value will be returned to the output.

Type:String[]
Position:1
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.SharePoint.Client.ClientObject