Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 1.39 KB

GetPnPContentType.md

File metadata and controls

46 lines (39 loc) · 1.39 KB

#Get-PnPContentType Retrieves a content type ##Syntax

Get-PnPContentType [-Web <WebPipeBind>]
                   [-Identity <ContentTypePipeBind>]
                   [-List <ListPipeBind>]
                   [-InSiteHierarchy [<SwitchParameter>]]

##Returns

Microsoft.SharePoint.Client.ContentType

##Parameters

Parameter Type Required Description
Identity ContentTypePipeBind False Name or ID of the content type to retrieve
InSiteHierarchy SwitchParameter False Search site hierarchy for content types
List ListPipeBind False List to query
Web WebPipeBind False The web to apply the command to. Omit this parameter to use the current web.
##Examples

###Example 1

PS:> Get-PnPContentType 

This will get a listing of all available content types within the current web

###Example 2

PS:> Get-PnPContentType -InSiteHierarchy

This will get a listing of all available content types within the site collection

###Example 3

PS:> Get-PnPContentType -Identity "Project Document"

This will get the content type with the name "Project Document" within the current context

###Example 4

PS:> Get-PnPContentType -List "Documents"

This will get a listing of all available content types within the list "Documents"