Table of contents
TOC
Collapse the table of content
Expand the table of content

Set-PnPDefaultContentTypeToList

Bert Jansen|Last Updated: 2/20/2017
|
1 Contributor

Sets the default content type for a list

Syntax

Set-PnPDefaultContentTypeToList -List <ListPipeBind>
                                -ContentType <ContentTypePipeBind>
                                [-Web <WebPipeBind>]

Parameters

ParameterTypeRequiredDescription
ContentTypeContentTypePipeBindTrueThe content type object that needs to be added to the list
ListListPipeBindTrueThe name of a content type, its ID or an actual content type object that needs to be removed from the specified list.
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Set-PnPDefaultContentTypeToList -List "Project Documents" -ContentType "Project"

This will set the Project content type (which has already been added to a list) as the default content type

© 2017 Microsoft