New-SPOListItem

Creates a new list item within an existing List.

New-SPOListItem -Web <SPOWebPipeBind> [-List [<SPOListPipeBind>]] [-ListRelativeUrlFolderPath [<String>]] [-FieldValues [<PropertiesPipeBind>]]

Parameters

1

ParameterRequiredTypeDescription
WebTrueSPOWebPipeBind

Specifies the identity of the Site containing the List to add the item to.

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.

ListFalseSPOListPipeBind

Specifies the List to add the item 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.

ListRelativeUrlFolderPathFalseString

Create the item within a subfolder inside the list. Only include the path relative to the root of the list.

FieldValuesFalsePropertiesPipeBind

The collection of field values to set where the key is the internal field name. The type must be a hash table where each key represents the name of a field whose value should be set to the corresponding key value (e.g., @{"Field1"="Value1";"Field2"="Value2"}). Alternatively, provide the path to a file with XML property settings (<Properties><Property Name="Name1">Value1</Property><Property Name="Name2">Value2</Property></Properties>).

Detailed Description

Creates a new list item within an existing 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-SPOListItem -Web "/" -List "My List" -FieldValues @{"Title"="My new list item"}

This example creates a new list item within the List My List under the root Site of the current Site Collection.