Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 1 KB

AddPnPContentTypeToList.md

File metadata and controls

25 lines (22 loc) · 1 KB

#Add-PnPContentTypeToList Adds a new content type to a list ##Syntax

Add-PnPContentTypeToList -List <ListPipeBind>
                         -ContentType <ContentTypePipeBind>
                         [-DefaultContentType [<SwitchParameter>]]
                         [-Web <WebPipeBind>]

##Parameters

Parameter Type Required Description
ContentType ContentTypePipeBind True Specifies the content type that needs to be added to the list
List ListPipeBind True Specifies the list the content type needs to be added to
DefaultContentType SwitchParameter False Specify if the content type needs to be the default content type or not
Web WebPipeBind False The web to apply the command to. Omit this parameter to use the current web.
##Examples

###Example 1

PS:> Add-PnPContentTypeToList -List "Documents" -ContentType "Project Document" -DefaultContentType

This will add an existing content type to a list and sets it as the default content type