Add-SPOListViewWebPart

Adds a web part to a web part page or wiki page.

Add-SPOListViewWebPart -Zone <String> -ZoneIndex <Int32> -Web <SPOWebPipeBind> [-File [<SPOFilePipeBind>]] -List <SPOListPipeBind> [-ViewTitle [<String>]] [-ViewSchema [<XmlDocumentPipeBind>]] [-Title [<String>]] [-JSLink [<String>]] [-ChromeType [<PartChromeType>]]

Add-SPOListViewWebPart -Row <Int32> -Column <Int32> [-AddSpace [<SwitchParameter>]] -Web <SPOWebPipeBind> [-File [<SPOFilePipeBind>]] -List <SPOListPipeBind> [-ViewTitle [<String>]] [-ViewSchema [<XmlDocumentPipeBind>]] [-Title [<String>]] [-JSLink [<String>]] [-ChromeType [<PartChromeType>]]

Parameters

1

ParameterRequiredTypeDescription
ZoneTrueString

The zone to add the web part to.

ZoneIndexTrueInt32

The zone index to add the web part to.

WebTrueSPOWebPipeBind

Specifies the identity of the Site containing the file to add the web part 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.

FileFalseSPOFilePipeBind

Specifies the file to add the web part to.

The type must be a valid server relative URL, in the form /site_name/list_name/file_name, or an SPOFile or SPOWikiPage object, or Microsoft.SharePoint.Client.File object.

ListTrueSPOListPipeBind

The list to whose view will be added to the page.

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.

ViewTitleFalseString

The name of the view to use for the list view web part.

ViewSchemaFalseXmlDocumentPipeBind

The view schema to apply.

TitleFalseString

The title of the web part to add.

JSLinkFalseString

Set a specific JSLink file.

ChromeTypeFalsePartChromeType

The chrome settings for the web part.

2

ParameterRequiredTypeDescription
RowTrueInt32

The zone to add the web part to.

ColumnTrueInt32

The zone index to add the web part to.

AddSpaceFalseSwitchParameter

Add some space before the web part.

WebTrueSPOWebPipeBind

Specifies the identity of the Site containing the file to add the web part 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.

FileFalseSPOFilePipeBind

Specifies the file to add the web part to.

The type must be a valid server relative URL, in the form /site_name/list_name/file_name, or an SPOFile or SPOWikiPage object, or Microsoft.SharePoint.Client.File object.

ListTrueSPOListPipeBind

The list to whose view will be added to the page.

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.

ViewTitleFalseString

The name of the view to use for the list view web part.

ViewSchemaFalseXmlDocumentPipeBind

The view schema to apply.

TitleFalseString

The title of the web part to add.

JSLinkFalseString

Set a specific JSLink file.

ChromeTypeFalsePartChromeType

The chrome settings for the web part.

Detailed Description

Adds a web part to a web part page or wiki page.

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 1-----------------------

PS C:\> Add-SPOListViewWebPart -Web "/" -File "/sitepages/home.aspx" -WebPart "c:\announcements.webpart" -Row 1 -Column 1 -AddSpace

This example adds an announcements web part to the home.aspx wiki page located in the root web of the root site collection.

------------------EXAMPLE 2-----------------------

PS C:\> Add-SPOListViewWebPart -Web "/" -File "/default.aspx" -WebPart "c:\announcements.webpart" -Title "Announcements" -Zone "MiddleColumn" -ZoneIndex 1

This example adds an announcements web part to the default.aspx web part page located in the root web of the root site collection.