New-SPOListFolder

Creates a Folder in a list or library.

New-SPOListFolder -Web <SPOWebPipeBind> [-List [<SPOListPipeBind>]] -ListRelativeUrlFolderPath <String>

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.

ListRelativeUrlFolderPathTrueString

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

Detailed Description

Creates a folder in the specified list. The Site provided by the -Web parameter must correspond to the Site where the folder and List is located or else an argument out of range exception will be thrown.

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-SPOListFolder -Web "/" -List "Documents" -ListRelativeUrlFolderPath "My Top Level Folder/My Sub-Folder"

Creates the folders "My Top Level Folder/My Sub-Folder" in the Documents library within the root Site of the current Site Collection.