New-SPOField

Creates a new Field within an existing Site or List.

New-SPOField -Web <SPOWebPipeBind> -List <SPOListPipeBind> -SchemaXml <XmlDocumentPipeBind> [-AddToDefaultView [<SwitchParameter>]] [-Options [<AddFieldOptions>]]

New-SPOField -Web <SPOWebPipeBind> -SchemaXml <XmlDocumentPipeBind> [-Options [<AddFieldOptions>]]

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.

ListTrueSPOListPipeBind

Specifies the List to add the Content Type to.

The type must be a valid absolute URL, in the form http://contoso.sharepoint.com/site_name/lists/list_name, or an SPOList object, Microsoft.SharePoint.Client.List object, List title, or GUID representing the List ID.

SchemaXmlTrueXmlDocumentPipeBind

Specifies the XML schema of the new Field.

AddToDefaultViewFalseSwitchParameter

If specified, add the field to the default view.

OptionsFalseAddFieldOptions

Field creation options.

2

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.

SchemaXmlTrueXmlDocumentPipeBind

Specifies the XML schema of the new Field.

OptionsFalseAddFieldOptions

Field creation options.

Detailed Description

Creates a new Field 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-SPOField -Web "/" -SchemaXml $schema -Options "AddFieldInternalNameHint"

This example creates a new site column using the schema definition stored within $schema.