Get-PnPField

Returns a field from a list or site

Syntax

Get-PnPField
   [-Includes <String[]>]
               [-List <ListPipeBind>]
               [-Identity <FieldPipeBind>]
               [-Group <String>]
               [-InSiteHierarchy [<SwitchParameter>]]
               [-Web <WebPipeBind>]
               [-Connection <SPOnlineConnection>]

Examples

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

Get-PnPField

Gets all the fields from the current site

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

Get-PnPField -List "Demo list" -Identity "Speakers"

Gets the speakers field from the list Demo 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
-Group

Filter to the specified group

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

The field object or name to get

Type:FieldPipeBind
Position:0
Accept pipeline input:True
Accept wildcard characters:False
-InSiteHierarchy

Search site hierarchy for fields

Type:SwitchParameter
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 list object or name where to get the field from

Type:ListPipeBind
Position:Named
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.Field