New-SPOContentType

Creates a new content type within an existing Site or List.

New-SPOContentType -Web <SPOWebPipeBind> -Name <String> [-Description [<String>]] [-Group [<String>]] -ParentContentType <SPOContentTypePipeBind> [-FieldsToAdd [<String[]>]]

Parameters

1

ParameterRequiredTypeDescription
WebTrueSPOWebPipeBind

Specifies the identity of the Site to create the new Content Type within.

The type must be a valid server relative URL, in the form /site_name, or an SPOWeb object, Microsoft.SharePoint.Client.Web object, or GUID representing the Site ID.

NameTrueString

Specifies the name of the new Content Type.

DescriptionFalseString

Describes the new Content Type. If no description is specified, the entry is left blank.

GroupFalseString

Describes the new Content Type. If no description is specified, the entry is left blank.

ParentContentTypeTrueSPOContentTypePipeBind

Sets a value that specifies the Content Type that the new Content Type will inherit from. The type must be a valid name, Content Type ID, Microsoft.SharePoint.Client.ContentType object or SPOContentType object.

FieldsToAddFalseString[]

An array of internal field names to add to the content type.

Detailed Description

Creates a new content type within an existing Site or List.

Copyright 2016 Falchion Consulting, LLC

> For more information on this cmdlet and others:

> http://blog.falchionconsulting.com/

> Use of this cmdlet is at your own risk.

> Gary Lapointe assumes no liability.

Examples

------------------EXAMPLE------------------

PS C:\> New-SPOContentType -Web "/" -Name "My Content Type" -ParentContentType $contentType

This example creates a new content type with the name of My Content Type under the root Site of the current Site Collection.