Retrieves a content type
Get-PnPContentType [-List <ListPipeBind>]
[-InSiteHierarchy [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Identity <ContentTypePipeBind>]
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. |
PS:> Get-PnPContentType
This will get a listing of all available content types within the current web
PS:> Get-PnPContentType -InSiteHierarchy
This will get a listing of all available content types within the site collection
PS:> Get-PnPContentType -Identity "Project Document"
This will get the content type with the name "Project Document" within the current context
PS:> Get-PnPContentType -List "Documents"
This will get a listing of all available content types within the list "Documents"