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

Add-PnPFieldToContentType

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

Adds an existing site column to a content type

Syntax

Add-PnPFieldToContentType -Field <FieldPipeBind>
                          -ContentType <ContentTypePipeBind>
                          [-Required [<SwitchParameter>]]
                          [-Hidden [<SwitchParameter>]]
                          [-Web <WebPipeBind>]

Parameters

ParameterTypeRequiredDescription
ContentTypeContentTypePipeBindTrueSpecifies which content type a field needs to be added to
FieldFieldPipeBindTrueSpecifies the field that needs to be added to the content type
HiddenSwitchParameterFalseSpecifies whether the field should be hidden or not
RequiredSwitchParameterFalseSpecifies whether the field is required or not
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Add-PnPFieldToContentType -Field "Project_Name" -ContentType "Project Document"

This will add an existing site column with an internal name of "Project_Name" to a content type called "Project Document"

© 2017 Microsoft